/**
  * Create the helper object
  *
  * @return object The plugins helper object
  */
 private function getHelper()
 {
     // Already initialized, so return
     if ($this->_init) {
         return $this->_helper;
     }
     $this->_init = true;
     if (!$this->isFrameworkEnabled()) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php';
     if (!NNProtect::isComponentInstalled($this->_alias)) {
         return false;
     }
     if (NNProtect::isProtectedPage($this->_alias)) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/helper.php';
     $this->_helper = NNFrameworkHelper::getPluginHelper($this);
     return $this->_helper;
 }
Exemplo n.º 2
0
 /**
  * Create the helper object
  *
  * @return object The plugins helper object
  */
 private function getHelper()
 {
     // Already initialized, so return
     if ($this->_init) {
         return $this->_helper;
     }
     $this->_init = true;
     if (JFactory::getApplication()->input->getWord('format') == 'feed' || JFactory::getApplication()->input->getWord('type') == 'rss' || JFactory::getApplication()->input->getWord('type') == 'atom') {
         return false;
     }
     if (!$this->isFrameworkEnabled()) {
         return false;
     }
     jimport('joomla.filesystem.file');
     if (!JFile::exists(JPATH_ADMINISTRATOR . '/components/com_advancedmodules/advancedmodules.php')) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php';
     if (!NNProtect::isComponentInstalled($this->_alias)) {
         return false;
     }
     if (NNProtect::isProtectedPage($this->_alias)) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
     $params = NNParameters::getInstance()->getComponentParams('advancedmodules');
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/helper.php';
     $this->_helper = NNFrameworkHelper::getPluginHelper($this, $params);
     return $this->_helper;
 }