public function getBySlugAction() { $flatpageRow = $this->_helper->getObjectOr404('cms/flatpage', array('id' => $this->_getParam('id'), 'is_published' => 1, 'published_at__lt' => new Zend_Db_Expr('NOW()'))); Centurion_Signal::factory('pre_display_rte')->send($flatpageRow, array($flatpageRow)); Centurion_Cache_TagManager::addTag($flatpageRow); return $this->renderToResponse($flatpageRow->flatpage_template->view_script, array('currentFlatpageRow' => $flatpageRow)); }
public function _getRoute() { Centurion_Cache_TagManager::addTag($this); if (null === $this->_route) { $url = $this->url; $pt = Centurion_Db::getSingleton('core/navigation')->findOneByProxy($this); if (null !== $pt) { while (null !== ($pt = $pt->getParent()) && $pt !== null && null != ($proxy = $pt->getProxy())) { if (isset($proxy->url)) { $url = $proxy->url . $url; } else { if (isset($proxy->slug)) { $url = '/' . $proxy->slug . $url; } } } } $this->_route = new Centurion_Controller_Router_Route_Static($url, array('controller' => 'flatpage', 'action' => 'get', 'module' => 'cms', 'id' => $this->pk)); } return $this->_route; }
public function tag($tags) { return Centurion_Cache_TagManager::addTag($tags); }
/** * Add a tag to the current cache (if have one) * * @param string|Centurion_Db_Table_Abstract|Centurion_Db_Table_Row_Abstract $tag * @return $this */ public function addTag($tag) { Centurion_Cache_TagManager::addTag($tag); return $this; }
public function getNavigationData($identity = null) { Centurion_Cache_TagManager::addTag($this); if (null !== $this->getProxy()) { Centurion_Cache_TagManager::addTag($this->getProxy()); } if (!$this->isVisible($identity)) { return null; } $navigationData = array(); $navigationData['id'] = $this->id; $navigationData['visible'] = $this->is_visible; $navigationData['label'] = $this->getLabel(); $navigationData['class'] = $this->class; if (trim($navigationData['label']) == '') { return null; } $navigationData['permission'] = $this->getPermission(); $navigationData += $this->getRouteData($identity); return $navigationData; }