/** * @Acl allow blog-writer * @Acl allow blog-admin */ public function index($page = 1) { $this->_adminTab = 'BlogManageAdminTab'; $blogPager = Blog::blogs(CoOrg::getLanguage()); $this->blogs = $blogPager->execute($page, 15); $this->blogpager = $blogPager; $this->render('admin/index'); }
public function run($controller) { $class = new stdClass; $class->language = CoOrg::getLanguage(); $class->tags = array(); $class->category = 'text'; $class->title = CoOrg::config()->get('site/title'); $class->description = CoOrg::config()->get('site/subtitle'); return $class; }
/** * @before find $name */ public function edit($name, $language = null) { $this->menu = $this->_menu; if ($language) { $adminLanguage = $language; } else { $adminLanguage = CoOrg::getLanguage(); } $this->adminlanguage = $adminLanguage; $this->providerActionCombos = Menu::providerActionCombos($adminLanguage); $newEntry = new MenuEntry; $newEntry->menuID = $name; $newEntry->language = $adminLanguage; $this->newEntry = $newEntry; $this->render('edit'); }
public function show($id, $language = null) { if ($language == null) { $language = CoOrg::getLanguage(); } else { $this->viewingTranslation = true; } $page = Page::get($id, $language); if ($page != null) { $this->page = $page; $this->render('show'); } else { $this->error(t('Page not found')); $this->notFound(); } }
public function tag($tag) { $this->searchResults = Taggable::selectNodes($tag, CoOrg::getLanguage()); $this->render('tagresults'); }
protected function fetchLatest($page = 1) { $pager = Blog::blogs(CoOrg::getLanguage()); $this->blogs = $pager->execute($page, 10); $this->blogpager = $pager; return true; }
protected function find($ID, $language = null) { if ($ID == null) {return true;} $this->_page = Page::get($ID, $language ? $language : CoOrg::getLanguage()); if (!$this->_page) { $this->error(t('Page not found')); $this->notfound(); return false; } else { return true; } }
public function run($widgetParams, $orient, $request) { $this->blogArchive = Blog::getArchives(CoOrg::getLanguage()); return $this->render('aside/archive'); }