Source of file LivetickerPageController.php
Size: 0,806 Bytes - Last Modified: 2021-12-23T10:51:27+00:00
/var/www/docs.ssmods.com/process/src/src/Controllers/LivetickerPageController.php
12345678910111213141516171819202122232425262728 | <?php namespace TheWebmen\Liveticker\Pages; use SilverStripe\View\Requirements; use TheWebmen\Liveticker\Models\LivetickerCategory; class LivetickerPageController extends \PageController { public function init() { parent::init(); Requirements::javascript('thewebmen/silverstripe-liveticker:resources/js/promise-polyfill.js'); Requirements::javascript('thewebmen/silverstripe-liveticker:resources/js/tmpl.min.js'); Requirements::javascript('thewebmen/silverstripe-liveticker:resources/js/liveticker.js'); } public function ActiveCategory() { $category = $this->getRequest()->getVar('category'); if(!$category){ return false; } return LivetickerCategory::get()->filter('Slug', $category)->first(); } } |