Exemplo n.º 1
0
 public function getPages($samples = 0)
 {
     if (empty($this->_pages)) {
         $option = new Application_Model_Option_Value();
         $this->_pages = $option->findAll(array('remove_folder' => new Zend_Db_Expr('folder_category_id IS NULL'), 'is_visible' => 1));
     }
     if ($this->_pages->count() == 0 and $samples > 0) {
         $color = str_replace('#', '', $this->getDesignBlock('tabbar')->getImageColor());
         $dummy = new Application_Model_Option();
         $dummy->find('newswall', 'code');
         $dummy->setTabbarName('Sample')->setIsDummy(1)->setIconUrl(parent::getUrl('template/block/colorize', array('id' => $dummy->getIconId(), 'color' => $color)));
         for ($i = 0; $i < $samples; $i++) {
             $this->_pages->addRow($this->_pages->count(), $dummy);
         }
     }
     return $this->_pages;
 }