Пример #1
0
 /**
  * Exection hook
  *
  * @param Stencil_Interface $controller Controller that initiated this class.
  */
 public function execute(Stencil_Interface $controller)
 {
     $object = get_queried_object();
     if (class_exists('Taxonomy', false)) {
         $controller->set('taxonomy', Taxonomy::get($object->taxonomy));
     } else {
         $controller->set('taxonomy', $object);
     }
 }
Пример #2
0
 function __construct()
 {
     parent::__construct();
     $this->beforeFilter(function () {
         if (!Auth::check()) {
             return Redirect::to('auth');
         }
     });
     $this->taxonomy = Taxonomy::get('article');
 }
Пример #3
0
 function __construct()
 {
     parent::__construct();
     $this->beforeFilter(function () {
         if (!Auth::check()) {
             return Redirect::to('auth');
         }
     });
     $this->taxonomy = Taxonomy::get('page');
     Event::listen('page_attachment', function ($page) {
         echo View::make('sections.feed.attachment-page', array('post' => $page->toArray(), 'list' => Feed::orderBy('name', 'asc')->get()));
     });
 }