Example #1
0
 public function renderTemplate($template, $moduleContent)
 {
     if ($this->inlineAdmin) {
         $excluded = Curry_Core::$config->curry->backend->placeholderExclude->toArray();
         $placeholders = array();
         $tpl = $template;
         while ($tpl) {
             $placeholders = array_merge($placeholders, $tpl->getPlaceholders());
             $tpl = $tpl->getParent(array());
         }
         foreach ($placeholders as $id => $placeholder) {
             if (in_array($placeholder, $excluded)) {
                 continue;
             }
             if (!array_key_exists($placeholder, $moduleContent)) {
                 $moduleContent[$placeholder] = '';
             }
             $moduleContent[$placeholder] = $this->adminBlock($moduleContent[$placeholder], $placeholder, $id);
         }
     }
     return parent::renderTemplate($template, $moduleContent);
 }
Example #2
0
 /**
  * Add additional headers to force no caching of page.
  * 
  * @todo Should we really disable caching here?
  */
 protected function preGeneration()
 {
     parent::preGeneration();
     header('Cache-Control: no-cache, must-revalidate');
     header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
 }
Example #3
0
 /**
  * Get the page generator class used to generate the current page.
  *
  * @return Curry_Request
  */
 public function getRequest()
 {
     return $this->pageGenerator->getRequest();
 }