Exemple #1
0
 /**
  * @see parent::getImages()
  */
 protected function getImages()
 {
     $Item = new Gallery_Item();
     $params = array();
     $params[] = $Item->getParam('type', Gallery::GALLERY);
     return $Item->findList($params, 'PostedAt desc', 0, 10);
 }
Exemple #2
0
 /**
  * @see parent::getImages()
  */
 protected function getImages($limit = 10)
 {
     $Item = new Gallery_Item();
     $params = array();
     $params[] = $Item->getParam('type', Gallery::CAPABILITY);
     return $Item->findList($params, 'Position asc', 0, $limit);
 }
Exemple #3
0
 /**
  * The function returns top block on index page.
  * 
  * @access protected
  * @return string The HTML code.
  */
 protected function htmlIndexTop()
 {
     $blocks = array();
     $Page = $this->getController()->getContentPage();
     foreach ($Page->getBlocks(4) as $Block) {
         $Block->Link = _L('Controller_Frontend_Service');
         $blocks[] = $Block;
     }
     if (count($blocks) < 4) {
         $count = count($blocks);
         for ($i = 0; $i < 4 - $count; $i++) {
             $Block = new Content_Page_Block();
             $Block->Link = _L('Controller_Frontend_Service');
             $blocks[] = $Block;
         }
     }
     $Item = new Gallery_Item();
     $blocks[0]->Images = $Item->findList(array($Item->getParam('type', Gallery::CAPABILITY)), 'Position asc', 0, 6);
     $blocks[0]->Link = _L('Controller_Frontend_Service_Capability');
     $blocks[1]->Link = _L('Controller_Frontend_Service_Design');
     $blocks[2]->Link = _L('Controller_Frontend_Service_Order');
     $blocks[3]->Images = $Item->findList(array($Item->getParam('type', Gallery::GALLERY)), 'PostedAt desc', 0, 6);
     $blocks[3]->Link = _L('Controller_Frontend_Service_Production');
     return $this->includeLayout('view/index/top.html', array('blocks' => $blocks));
 }