[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/wact/src/tags/pager/ -> prev.tag.php (source)

   1  <?php
   2  /*
   3   * Limb PHP Framework
   4   *
   5   * @link http://limb-project.com 
   6   * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
   7   * @license    LGPL http://www.gnu.org/copyleft/lesser.html 
   8   */
   9  
  10  /**
  11   * @tag pager:PREV
  12   * @restrict_self_nesting
  13   * @parent_tag_class WactPagerNavigatorTag
  14   * @package wact
  15   * @version $Id: prev.tag.php 5945 2007-06-06 08:31:43Z pachanga $
  16   */
  17  class WactPagerPrevTag extends WactCompilerTag
  18  {
  19    function generateTagContent($code)
  20    {
  21      $parent = $this->findParentByClass('WactPagerNavigatorTag');
  22      $code->writePhp('if (' . $parent->getComponentRefCode() . '->hasPrev()) {');
  23  
  24      $code->writePhp($this->getDataSource()->getComponentRefCode() . '["href"] = ' .
  25                      $parent->getComponentRefCode() . '->getPageUri( ' .
  26                      $parent->getComponentRefCode() . '->getDisplayedPage() - 1 );' . "\n");
  27  
  28      parent :: generateTagContent($code);
  29  
  30      $code->writePhp('}' . "\n");
  31    }
  32  }
  33  
  34  ?>


Generated: Thu Jan 8 04:06:23 2009 Cross-referenced by PHPXref 0.7