/**
  * Returns block item XHTML 
  * 
  * @param mixed $args
  * @return array
  */
 public static function getValidItems($args)
 {
     include_once 'kernel/common/template.php';
     $http = eZHTTPTool::instance();
     $tpl = templateInit();
     $result = array();
     $blockID = $http->postVariable('block_id');
     $offset = $http->postVariable('offset');
     $limit = $http->postVariable('limit');
     $validNodes = eZFlowPool::validNodes($blockID);
     $counter = 0;
     foreach ($validNodes as $validNode) {
         $counter++;
         if ($counter <= $offset) {
             continue;
         }
         $tpl->setVariable('node', $validNode);
         $tpl->setVariable('view', 'block_item');
         $tpl->setVariable('image_class', 'blockgallery1');
         $content = $tpl->fetch('design:node/view/view.tpl');
         $result[] = $content;
         if ($counter === $limit) {
             break;
         }
     }
     return $result;
 }
コード例 #2
0
 /**
  * Returns block item XHTML
  *
  * @param mixed $args
  * @return array
  */
 public static function getValidItems($args)
 {
     $http = eZHTTPTool::instance();
     $tpl = eZTemplate::factory();
     $result = array();
     $blockID = $http->postVariable('block_id');
     $offset = $http->postVariable('offset');
     $limit = $http->postVariable('limit');
     $validNodes = eZFlowPool::validNodes($blockID);
     $counter = 0;
     foreach ($validNodes as $validNode) {
         if (!$validNode->attribute('can_read')) {
             continue;
         }
         $counter++;
         if ($counter <= $offset) {
             continue;
         }
         $tpl->setVariable('node', $validNode);
         $tpl->setVariable('view', 'block_item');
         $tpl->setVariable('image_class', 'blockgallery1');
         $content = $tpl->fetch('design:node/view/view.tpl');
         $result[] = $content;
         if ($counter === $limit) {
             break;
         }
     }
     return $result;
 }
コード例 #3
0
ファイル: functioncollection.php プロジェクト: nfrp/ezflow
 function fetchValidNodes($blockID)
 {
     $result = array('result' => eZFlowPool::validNodes($blockID));
     return $result;
 }
コード例 #4
0
 /**
  * Fetches valid items
  *
  * @return array(eZContentObjectTreeNode)
  */
 public function getValidItemsAsNodes()
 {
     $validItemsAsNodes = eZFlowPool::validNodes( $this->id() );
     return $validItemsAsNodes;
 }