コード例 #1
0
 public function renderDetail($idGallery, $lang)
 {
     $gallery = $this->gallery->getGallery($idGallery, $lang);
     if (!$gallery) {
         $this->error($this->translator->trans('admin.commons.error'));
     }
     $this->title($this->translator->translate('admin.gallery.detail.title', ['title' => $gallery->name]));
     $this->navigation->addItem('admin.gallery.title', 'Gallery:');
     $this->template->gallery = $gallery;
     $this->template->galleryPath = galleryPath . $gallery->idGallery . '_' . $gallery->lang;
     $this->lang = $gallery->lang;
     $this['galleryForm']->setDefaults($gallery->toArray());
 }
コード例 #2
0
 public function renderDetail($id)
 {
     $gallery = $this->gallery->getGallery($id, $this->translator->getLocale());
     $this->template->galleryPath = galleryPath . $gallery->idGallery . '_' . $gallery->lang;
     $this->template->gallery = $gallery;
 }