/** * PHP5 constructor * * @global object $objTemplate * @global array $_ARRAYLANG */ public function __construct($name) { global $objTemplate, $_ARRAYLANG, $objJs; parent::__construct($name); $objJs = new CrmJavascript(); $cx = \Cx\Core\Core\Controller\Cx::instanciate(); $this->_mediaPath = $cx->getWebsiteMediaCrmPath(); $this->_objTpl = new \Cx\Core\Html\Sigma($cx->getCodeBaseModulePath() . '/' . $this->moduleName . '/View/Template/Backend'); \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl); $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE); $this->act = $_REQUEST['act']; $contentNavigation = ''; if (\Permission::checkAccess($this->customerAccessId, 'static', true)) { $contentNavigation .= "<a href='index.php?cmd=" . $this->moduleName . "&act=customers' class='" . ($this->act == 'customers' ? 'active' : '') . "' title='" . $_ARRAYLANG['TXT_CRM_CUSTOMERS'] . "'>{$_ARRAYLANG['TXT_CRM_CUSTOMERS']}</a>"; } $contentNavigation .= "<a href='index.php?cmd=" . $this->moduleName . "&act=task' class='" . ($this->act == 'task' ? 'active' : '') . "' title='{$_ARRAYLANG['TXT_CRM_TASKS']}'>{$_ARRAYLANG['TXT_CRM_TASKS']}</a>\n <a href='index.php?cmd=" . $this->moduleName . "&act=deals' class='" . ($this->act == 'deals' ? 'active' : '') . "' title='{$_ARRAYLANG['TXT_CRM_OPPORTUNITY']}'>{$_ARRAYLANG['TXT_CRM_OPPORTUNITY']}</a>"; if (\Permission::checkAccess($this->adminAccessId, 'static', true)) { $contentNavigation .= "<a href='index.php?cmd=" . $this->moduleName . "&act=settings' class='" . ($this->act == 'settings' || $this->act == 'mailtemplate_overview' || $this->act == 'mailtemplate_edit' ? 'active' : '') . "' title='" . $_ARRAYLANG['TXT_CRM_SETTINGS'] . "'>" . $_ARRAYLANG['TXT_CRM_SETTINGS'] . "</a>"; } $objTemplate->setVariable("CONTENT_NAVIGATION", $contentNavigation); $dispatcher = CrmEventDispatcher::getInstance(); $default_handler = new \Cx\Modules\Crm\Model\Events\CrmDefaultEventHandler(); $dispatcher->addHandler(CRM_EVENT_ON_USER_ACCOUNT_CREATED, $default_handler); $dispatcher->addHandler(CRM_EVENT_ON_TASK_CREATED, $default_handler); $dispatcher->addHandler(CRM_EVENT_ON_ACCOUNT_UPDATED, $default_handler); $this->_initCrmModule(); }
/** * php 5.3 contructor * * @param object $objTpl template object */ function __construct($objTpl, $name) { $this->_objTpl = $objTpl; parent::__construct($name); }
/** * php 5.3 contructor * * @param object $objTpl template object */ function __construct($objTpl, $name) { $this->_objTpl = $objTpl; $this->_mediaPath = \Cx\Core\Core\Controller\Cx::instanciate()->getWebsiteMediaCrmPath(); parent::__construct($name); }