Beispiel #1
0
 /**
  * @return mixed
  */
 protected function _init()
 {
     if ($this->_module->isCustomModule()) {
         $uploadDir = IfwPsn_Wp_Proxy_Blog::getUploadDir();
         $this->_url = $uploadDir['baseurl'] . '/' . $this->_customLocationName . '/' . $this->_pathinfo->getDirname() . '/';
     } else {
         // built-in module
         $dirnamePathParts = array_reverse(explode(DIRECTORY_SEPARATOR, $this->_pathinfo->getDirnamePath()));
         $this->_url = plugins_url($dirnamePathParts[3]) . '/modules/' . $this->_pathinfo->getDirname() . '/';
     }
     $this->_urlFiles = $this->_url . 'files/';
     $this->_urlCss = $this->_urlFiles . 'css/';
     $this->_urlJs = $this->_urlFiles . 'js/';
     $this->_urlImg = $this->_urlFiles . 'img/';
     $this->_version = $this->_module->getVersion();
     $this->_name = $this->_module->getName();
     $this->_description = $this->_module->getDescription();
     $this->_textDomain = $this->_module->getTextDomain();
     $this->_homepage = $this->_module->getHomepage();
 }
Beispiel #2
0
 /**
  * Registers the controller path
  */
 public function registerPath()
 {
     if ($this->_pm->getAccess()->isPlugin()) {
         // add controller dir
         if (is_dir($this->_pathinfo->getDirnamePath() . 'controllers')) {
             $front = IfwPsn_Zend_Controller_Front::getInstance();
             if ($front instanceof IfwPsn_Vendor_Zend_Controller_Front) {
                 $front->addControllerDirectory($this->_pathinfo->getDirnamePath() . 'controllers', strtolower($this->_pathinfo->getDirname()));
             }
         }
     }
 }