Esempio n. 1
0
 /**
  * Check if current page is an LC portal
  *
  * @return array
  */
 protected function getPortal()
 {
     $result = array(null, null, array());
     $item = menu_get_item();
     if ($item && !empty($item['path'])) {
         $result[0] = \XLite\Module\CDev\DrupalConnector\Drupal\Module::getInstance()->getPortal($item['path']);
         if ($result[0]) {
             $result[1] = $item['path'];
             $result[2] = empty($item['page_arguments']) ? array() : $item['page_arguments'];
         }
     }
     return $result;
 }
Esempio n. 2
0
 /**
  * Register a portal
  *
  * @param string  $url        Drupal URL
  * @param string  $controller Controller class name
  * @param string  $title      Portal title OPTIONAL
  * @param integer $type       Node type OPTIONAL
  *
  * @return void
  */
 protected function registerPortal($url, $controller, $title = '', $type = MENU_LOCAL_TASK)
 {
     if (!\XLite\Core\Config::getInstance()->CDev->Catalog->disable_checkout || !in_array($controller, $this->catalogToRemove)) {
         parent::registerPortal($url, $controller, $title, $type);
     }
 }