/** * @return void */ public function initialize() { $corePath = $this->modx->getOption('subdomainsfolder_core_path', null, $this->modx->getOption('core_path') . 'components/subdomainsfolder/'); require_once $corePath . 'model/subdomainsfolder/subdomainsfolder.class.php'; $this->SubdomainsFolder = new SubdomainsFolder($this->modx); $this->SubdomainsFolder->initialize($this->modx->context->key); $this->SubdomainsFolder->Tools->loadControllerFiles($this, array('css' => true, 'config' => true, 'tools' => true)); parent::initialize(); }
public function initialize($contextKey = 'web', $options = null) { parent::initialize($contextKey, $options); $corePath = $this->getOption('subdomainsfolder_core_path', null, $this->getOption('core_path', null, MODX_CORE_PATH) . 'components/subdomainsfolder/'); $this->SubdomainsFolder = $this->getService('SubdomainsFolder', 'SubdomainsFolder', $corePath . 'model/subdomainsfolder/'); if ($this->SubdomainsFolder) { $this->SubdomainsFolder->initialize($this->context->key); $this->domains = $this->SubdomainsFolder->Tools->getDomains(); } else { $this->log(modX::LOG_LEVEL_ERROR, 'modModX requires installed SubdomainsFolder.'); } }