Пример #1
0
    /**
     * @return void
     */
    public function initialize()
    {
        $corePath = $this->modx->getOption('admintools_core_path', null, $this->modx->getOption('core_path') . 'components/admintools/');
        require_once $corePath . 'model/admintools/admintools.class.php';
        $this->AdminTools = new AdminTools($this->modx);
        //$this->addCss($this->AdminTools->getOption('cssUrl') . 'mgr/main.css');
        $this->addJavascript($this->AdminTools->getOption('jsUrl') . 'mgr/admintools.js');
        $this->addHtml('
		<script type="text/javascript">
			AdminTools.config = ' . $this->modx->toJSON($this->AdminTools->getOptions()) . ';
			AdminTools.config.connector_url = "' . $this->AdminTools->getOption('connectorUrl') . '";
		</script>
		');
        parent::initialize();
    }