public function onRun()
 {
     $this->addJs('/plugins/betescurieuses/ae110815/assets/js/lightGallery.min.js');
     $this->addCss('/plugins/betescurieuses/ae110815/assets/style/lightGallery.css');
     $gallery = new Galleries();
     $this->gallery = $this->page['gallery'] = $gallery->where('slug', $this->param('slug'))->first();
 }
Esempio n. 2
0
 public function onRender()
 {
     $gallery = new Galleries();
     $this->gallery = $this->page['gallery'] = $gallery->where('id', '=', $this->propertyOrParam('idGallery'))->first();
     foreach ($this->getProperties() as $key => $value) {
         $this->page[$key] = $value;
     }
 }
 public function index_onDelete()
 {
     if (($checkedIds = post('checked')) && is_array($checkedIds) && count($checkedIds)) {
         foreach ($checkedIds as $itemId) {
             if (!($slider = Gallery::find($itemId))) {
                 continue;
             }
             $slider->delete();
         }
         Flash::success('Successfully deleted those selected.');
     }
     return $this->listRefresh();
 }
 public function onRun()
 {
     $this->page['photos'] = Gallery::orderBy('event_date', 'desc')->get();
 }