/** * Init */ public function init() { parent::init(); hook('form.page-createdit.init', array($this, 'extendPageForm')); hook('Pages.showPage.after', array($this, 'attachCommentsToPage')); hook('stack.Page.info', array($this, 'extendPageInfo')); allow_role(array('comments post'), 100); }
/** * Init */ public function init() { parent::init(); $cogear = getInstance(); $cogear->router->addRoute(':index', array($this, 'index'), TRUE); $url = config('pages.url', Pages_Gear::DEFAULT_PAGE_URL); $cogear->router->addRoute(str_replace(array('.', '<id>', '<url>'), array('\\.', '(?P<id>\\d+)', '.+'), $url), array($this, 'catchPage'), TRUE); allow_role(array('pages create'), 100); }