/** * 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; }
/** * 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; }
function fetchValidNodes($blockID) { $result = array('result' => eZFlowPool::validNodes($blockID)); return $result; }
/** * Fetches valid items * * @return array(eZContentObjectTreeNode) */ public function getValidItemsAsNodes() { $validItemsAsNodes = eZFlowPool::validNodes( $this->id() ); return $validItemsAsNodes; }