public function getCategoryPlantsById($id, $pack, $sizePack) { $list = new Model_Collection(); $data = $this->getCsv(); $data = str_getcsv($data, "|"); foreach ($data as $row) { $row = str_getcsv($row, ";"); if (isset($row[1]) && $row[1] == $id) { $list->append(Model_Plant_Source_File_Csv::buildPlant($row)); } } return $list; }
if ($this instanceof Manager_Controller) { $this->config('common/config/basic'); $this->storage->scripts->setCss('/css/projection.css'); $this->storage->pageId = 'projection-page'; $this->storage->metatags->setTitle('Rzuty projektu adaptacji - '); $this->storage->metatags->setDescription('rzuty w svg'); $this->storage->metatags->setKeywords('projekt'); $link = new Model_Link_Container(); $link->setTitle('Rzuty projektu remontu i adapcji domu')->setRoot(); $this->storage->breadcrumbs->set(0, $link); $event = new Manager_Event(); $event->setName('fluid')->setClass('Projection_Module_Image'); $this->add($event); /* nawigacja */ $url = '/rzut,k,'; $nav = new Model_Collection(); $link = new Model_Link_Container(); $link->setId(1)->setUrl($url . 'parter-inwent')->setTitle('Rzut parteru')->setClass('parter'); $nav->append($link); $link = new Model_Link_Container(); $link->setId(2)->setUrl($url . 'poddasze-inwent')->setTitle('Rzut poddasza')->setClass('poddasze'); $nav->append($link); $link = new Model_Link_Container(); $link->setId(3)->setUrl($url . 'piwnica')->setTitle('Rzut piwnicy')->setClass('piwnica'); $nav->append($link); /* $link = new Model_Link_Container(); $link->setId(4)->setUrl($url . 'front-polnoc' )->setTitle('Rzut frontu północnego')->setClass('front-polnoc'); $nav->append($link);*/ $link = new Model_Link_Container(); $link->setId(5)->setUrl($url . 'front-polnoc-luk-inwent')->setTitle('Rzut frontu północnego')->setClass('front-polnoc-luk'); $nav->append($link);
public function action_detail($id) { if (Input::method() == 'GET') { // $query = DB::select()->from('collections')->where('id',$id)->execute(); // Model_Collection::query()->related(array('colimge')); $data['row'] = Model_Collection::find($id, array('related' => array('colimg'))); $this->template->content = View::forge('collection/detail', $data); // $this->template->content->set('query',$query->as_array()); } }
public static function buildPlant($row) { $plant = new Model_Plant_Container(); $category = new Model_Plant_Category_Container(); $category->setId(trim($row[1])); $plant->setCategory($category); $plant->setId($row[3]); $plant->setName(trim($row[4])); $plant->setSpecies($row[5]); $plant->setGenus($row[6]); $plant->setPrice($row[7]); $plant->setHeight($row[8]); $pot = new Model_Plant_Pot_Container(); $pot->setWidth($row[9]); $pot->setHeight($row[10]); $plant->setPot($pot); $plant->setHeightMax($row[11]); $plant->setPeriodBloom($row[12]); $plant->setPeriodSow($row[13]); $items = new Model_Collection(); //foto child $photo = new Model_Gallery_Photo_Container(); $file = new Model_File_Container(); $file->setUrl($row[14]); $photo->setFile($file); $items->append($photo); //foto adult $photo = new Model_Gallery_Photo_Container(); $file = new Model_File_Container(); $file->setUrl($row[15]); $photo->setFile($file); $items->append($photo); $gallery = new Model_Gallery_Container(); $gallery->setItems($items); $plant->setGallery($gallery); return $plant; }
$this->storage->scripts->setCss('/css/basic.css'); /* $this->storage->scripts->setCss('/css/old/normalize.css'); $this->storage->scripts->setCss('/css/old/grid.css'); $this->storage->scripts->setCss('/css/old/theme.css'); */ $this->storage->scripts->setJs(Manager_Config::istatUrl() . 'js/modernizr.js', Manager_Helper_Scripts::SLOT_HEAD); $this->storage->scripts->setJs(Manager_Config::istatUrl() . 'js/jquery/jquery-1.11.2.min.js', Manager_Helper_Scripts::SLOT_FOOT); //$this->storage->scripts->setJs(Manager_Config::istatUrl() . 'js/jquery/jquery.cookie.js', Manager_Helper_Scripts::SLOT_FOOT); $this->storage->scripts->setJQuery(); $link = new Model_Link_Container(); $link->setTitle('Dom')->setUrl('/'); $this->storage->breadcrumbs->set(0, (new Model_Link_Container())->setTitle('Dom')->setUrl('/')); /** * navigation start */ $nav = new Model_Collection(); $link = new Model_Link_Container(); $link->setUrl('/')->setTitle('Strona główna')->setClass('front-page'); $nav->append($link); $link = new Model_Link_Container(); $link->setUrl('/rzut')->setTitle('Rzuty')->setClass('image-page'); $nav->append($link); $link = new Model_Link_Container(); $link->setUrl('/kontakt')->setTitle('Dojazd')->setClass('contact-page'); $nav->append($link); $link = new Model_Link_Container(); $link->setUrl('/galeria')->setTitle('Galeria ')->setClass('gallery-page'); $nav->append($link); /** * navigation end */