예제 #1
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;
     // only in html or raw (for ajax save order stuff)
     if (!in_array(JFactory::getDocument()->getType(), array('html', 'raw'))) {
         return false;
     }
     if (!$this->isFrameworkEnabled()) {
         return false;
     }
     require_once JPATH_LIBRARIES . '/regularlabs/helpers/protect.php';
     if (RLProtect::isProtectedPage($this->_alias)) {
         return false;
     }
     require_once JPATH_LIBRARIES . '/regularlabs/helpers/helper.php';
     $this->_helper = RLHelper::getPluginHelper($this);
     return $this->_helper;
 }