/**
  * Returns amount of pages using specific template
  *
  */
 public function pagesviatemplateAction()
 {
     $templateName = $this->getRequest()->getParam('template', '');
     if ($templateName) {
         $this->view->pagesUsingTemplate = Tools_Page_Tools::getPagesCountByTemplate($templateName);
     }
 }
Esempio n. 2
0
 public static function toArray($template, $currentTemplate = null)
 {
     return array('id' => $template->getId(), 'name' => $template->getName(), 'isCurrent' => $currentTemplate && $template->getName() == $currentTemplate->getName() ? true : false, 'pagesCount' => Tools_Page_Tools::getPagesCountByTemplate($template->getName()), 'type' => $template->getType(), 'content' => $template->getContent(), 'protected' => in_array($template->getName(), self::$protectedTemplates));
 }