/**
  * Hide component from frontpage
  * @return bool
  */
 private static function hideComponent()
 {
     $framework = Zo2Framework::getInstance();
     $params = Zo2Factory::getTemplate()->params;
     if ((int) $params->get('component_area', 0) && $framework->isFrontPage()) {
         return true;
     } else {
         return false;
     }
 }
 public function deleteProfile()
 {
     if ($this->_isAuthorized()) {
         $profile = JFactory::getApplication()->input->getString('profile');
         $templateId = JFactory::getApplication()->input->getInt('id');
         $template = Zo2Factory::getTemplate($templateId);
         if ($template) {
             $profile = JPATH_ROOT . '/templates/' . $template->template . '/assets/profiles/' . $profile . '.json';
             if (JFile::delete($profile)) {
                 $this->_ajax->addExecute('location.reload();');
             }
         }
     }
     $this->_ajax->response();
 }
 /**
  * Return singleton Zo2Layout instance
  * @staticvar Zo2Layout $instances
  * @return \Zo2Layout
  */
 public function getLayout($templateName = null)
 {
     static $instances;
     $templateId = Zo2Factory::getTemplate()->id;
     if (!isset($instances[$templateId])) {
         $instances[$templateId] = new Zo2Layout();
     }
     return $instances[$templateId];
 }