Exemple #1
0
 function __construct(modX &$modx, array $properties = array())
 {
     parent::__construct($modx, $properties);
     if (!($billing_path = $modx->getOption('billing.core_path'))) {
         $billing_path = $modx->getOption('core_path') . 'components/billing/';
     }
     $this->setProperties(array("billing_path" => $billing_path));
 }
Exemple #2
0
 function __construct(modX &$modx, array $properties = array())
 {
     parent::__construct($modx, $properties);
     if (!($namespace = $modx->getObject('modNamespace', 'dadata'))) {
         $error = "[dadata] Not found modNamespace: dadata ";
         $this->modx->log(modX::LOG_LEVEL_ERROR, $error);
         return $this->failure($error);
     }
 }
 public function __construct(modX &$modx, array $config = array())
 {
     parent::__construct($modx, $config);
     // using system settings instead of namespace for lightweight def. settings request
     $basePath = $this->modx->getOption('modexif.core_path', $config, $this->modx->getOption('core_path') . 'components/modexif/');
     $assetsUrl = $this->modx->getOption('modexif.assets_url', $config, $this->modx->getOption('assets_url') . 'components/modexif/');
     $managerUrl = $this->modx->getOption('modexif.manager_url', $config, $this->modx->getOption('manager_url') . 'components/modexif/');
     $this->config = array_merge(array('corePath' => $basePath, 'modelPath' => $basePath . 'model/', 'processorsPath' => $basePath . 'processors/', 'templatesPath' => $basePath . 'templates/', 'elementsPath' => $basePath . 'elements/', 'jsUrl' => $managerUrl . 'js/', 'cssUrl' => $managerUrl . 'css/', 'assetsUrl' => $assetsUrl, 'managerUrl' => $managerUrl, 'connectorsUrl' => $managerUrl . 'connectors/'), $config);
     $this->publicConfig = array('jsUrl' => $this->config['jsUrl'], 'cssUrl' => $this->config['cssUrl'], 'assetsUrl' => $this->config['assetsUrl'], 'managerUrl' => $this->config['managerUrl'], 'connectorsUrl' => $this->config['connectorsUrl']);
 }
 function __construct(modX &$modx, array $properties = array())
 {
     parent::__construct($modx, $properties);
     // Получаем путь до процессоров
     if (!($ns = $modx->getObject('modNamespace', 'modxrepository'))) {
         $err = "Не было получено пространство имен modxrepository";
         $modx->log(xPDO::LOG_LEVEL_ERROR, $err);
         $this->failure($err);
         return;
     }
     // Get processors params
     $this->processorsParams = array('processors_path' => $ns->getCorePath() . 'processors/', 'location' => 'rest/');
     /*
      * Be sure you set system setting modxRepository.handler_doc_id  
      */
     if (!($this->parent = $modx->getOption('modxRepository.handler_doc_id', null, false))) {
         return $modx->log(xPDO::LOG_LEVEL_ERROR, 'Please, be sure you set system setting modxRepository.handler_doc_id');
     }
 }
 function __construct(modX &$modx, array $properties = array())
 {
     set_exception_handler(array($this, 'exceptionHandler'));
     parent::__construct($modx, $properties);
 }