/** {@inheritDoc} */ public function initialize() { /** @var gl $gl */ $this->gl = $this->modx->getService('gl'); $this->gl->initialize($this->getProperty('context', $this->modx->context->key)); return parent::initialize(); }
public function initialize() { $signature = $this->getProperty('signature'); $this->package = $this->modx->getObject('transport.modTransportPackage', $signature); if (empty($this->package)) { $msg = $this->modx->lexicon('package_err_nf'); $this->modx->log(modX::LOG_LEVEL_ERROR, $msg); return $msg; } $this->package->parseSignature(); if ($this->package->provider != 0) { /* if package has a provider */ $this->provider = $this->package->getOne('Provider'); if (empty($this->provider)) { $msg = $this->modx->lexicon('provider_err_nf'); $this->modx->log(modX::LOG_LEVEL_ERROR, $msg); return $msg; } } else { /* if no provider, indicate it is up to date */ $msg = $this->modx->lexicon('package_err_uptodate', array('signature' => $this->package->get('signature'))); $this->modx->log(modX::LOG_LEVEL_INFO, $msg); return $msg; } return parent::initialize(); }
public function initialize() { $signature = $this->getProperty('signature'); $this->package = $this->modx->getObject('transport.modTransportPackage', $signature); if (empty($this->package)) { $msg = $this->modx->lexicon('package_err_nf'); $this->modx->log(modX::LOG_LEVEL_ERROR, $msg); return $msg; } $this->packageSignature = explode('-', $this->package->get('signature')); if ($this->package->provider != 0) { /* if package has a provider */ $this->provider = $this->package->getOne('Provider'); if (empty($this->provider)) { $msg = $this->modx->lexicon('provider_err_nf'); $this->modx->log(modX::LOG_LEVEL_ERROR, $msg); return $msg; } } else { /* if no provider, output error. you can't update something without a provider! */ $msg = $this->modx->lexicon('package_update_err_provider_nf'); $this->modx->log(modX::LOG_LEVEL_ERROR, $msg); return $msg; } return parent::initialize(); }
public function initialize() { $mode = $this->getProperty('mode'); if (in_array($mode, array('insert', 'overwrite', 'replace'))) { $this->mode = $mode; } return parent::initialize(); }
public function initialize() { $this->modx->setLogTarget('FILE'); $this->setProperties(array("failure_page" => $this->modx->getOption('modhybridauth.failure_page'))); # $this->modx->log(1, "EndPoint Processor"); # $this->modx->log(1, print_r($this->properties, 1)); return parent::initialize(); }
public function initialize() { /* Устанавливаем автоподстановку Тегов <br /> для Джевикса */ $this->modx->setOption('modjevix.AutoBrMode', true); return parent::initialize(); }
public function initialize() { $comments = $this->getProperty('comments'); if (empty($comments)) { return $this->modx->lexicon('quip.comment_err_ns'); } return parent::initialize(); }
public function initialize() { $notifications = $this->getProperty('notifications'); if (empty($notifications)) { return $this->modx->lexicon('quip.notification_err_ns'); } return parent::initialize(); }
public function initialize() { $threads = $this->getProperty('threads'); if (empty($threads)) { return $this->modx->lexicon('quip.thread_err_ns'); } return parent::initialize(); }
public function initialize() { if (!($this->mxManager = $this->modx->getService('mxmanager', 'mxManager', MODX_CORE_PATH . 'components/mxmanager/model/mxmanager/'))) { return false; } $this->_permissions = array('new_document' => $this->modx->hasPermission('new_document'), 'new_weblink' => $this->modx->hasPermission('new_weblink'), 'new_symlink' => $this->modx->hasPermission('new_symlink'), 'new_static_resource' => $this->modx->hasPermission('new_static_resource')); return parent::initialize(); }
public function initialize() { $ids = $this->getProperty('ids'); if (empty($ids)) { return $this->failure(); } $this->ids = explode(',', $ids); return parent::initialize(); }
public function initialize() { $this->setProperties(array("exchange_rate_tv" => (int) $this->modx->getOption('shopmodx.exchange_rate_tv'))); # if(!$this->getProperty('exchange_rate_tv')){ # $error = "Не указан ID TV-параметра курса валют"; # $this->modx->log(xPDO::LOG_LEVEL_ERROR, "[- ". __CLASS__ ." -] {$error}"); # return $error; # } return parent::initialize() && !$this->hasErrors(); }
public function initialize() { $this->setProperties($this->getInitializeProperties()); if ($email = mb_strtolower(trim($this->getProperty('email')))) { $this->setProperty('email', $email); } // Выполнеяем проверку данных if (!$this->validateFields()) { return "Проверьте правильность заполнения формы"; } return parent::initialize() && !$this->hasErrors(); }
/** * Ensure the info was properly passed and initialize the processor * * {@inheritDoc} * @return boolean */ public function initialize() { @set_time_limit(0); $info = $this->getProperty('info', ''); if (empty($info)) { return $this->modx->lexicon('package_download_err_ns'); } if (!$this->parseInfo($info)) { return $this->modx->lexicon('invalid_data'); } return parent::initialize(); }
public function initialize() { $data = $this->getProperty('data'); if (empty($data)) { return $this->modx->lexicon('invalid_data'); } $data = $this->modx->fromJSON($data); if (empty($data)) { return $this->modx->lexicon('invalid_data'); } $this->setProperties($data); $this->unsetProperty('data'); return parent::initialize(); }
public function initialize() { //print_r($this->getProperties()); if ($data = $this->modx->fromJSON($this->getProperty('data'))) { $this->setDefaultProperties($data); } //print_r($this->getProperties()); if (!(int) $this->getProperty('parent')) { return 'Не был получен ID модели'; } /*if(!$color = $this->getProperty('color')){ return 'Не был получен цвет'; } if(!$color = $this->getProperty('color')){ return 'Не было получено цветовое исполнение'; }*/ return parent::initialize(); }
public function initialize() { $flag = true; $componentPath = (string) $this->modx->getOption('phpthumbon.core_path', null, $this->modx->getOption('core_path') . 'components/phpthumbon/'); $this->_cfg = array('componentPath' => $componentPath, 'modelPath' => $componentPath . 'model/'); $this->modx->addPackage("phpthumbon", $this->_cfg['modelPath']); CreateThumbProcessor::$TotalQueue = $this->modx->getOption('phpthumbon.total_queue', array(), CreateThumbProcessor::$TotalQueue); $this->protectTotal(); if (!isset($this->modx->phpThumbOn)) { $this->properties = array('phpthumbon.queue' => 0); $this->modx->phpThumbOn = $this->modx->getService("phpthumbon", "phpThumbOn", $this->_cfg['modelPath'] . 'phpthumbon/', $this->getProperties()); } if (!($flag = $this->modx->phpThumbOn instanceof phpThumbOn)) { $this->modx->log(modX::LOG_LEVEL_ERROR, '[phpthumbon] Could not load phpThumbOn class'); $this->modx->error->failure('Could not load phpThumbOn class'); $this->modx->phpThumbOn = null; $flag = false; } else { $flag = $this->_getObject(); } return $flag ? parent::initialize() : false; }
/** * Ensure the info was properly passed and initialize the processor * * {@inheritDoc} * @return boolean */ public function initialize() { @set_time_limit(0); $signature = $this->getProperty('signature', ''); $name = $this->getProperty('name', ''); $constraints = $this->getProperty('constraints', ''); if (empty($signature)) { return $this->modx->lexicon('package_download_err_ns'); } if (empty($name)) { return $this->modx->lexicon('package_download_err_ns'); } if (empty($constraints)) { return $this->modx->lexicon('package_download_err_ns'); } $package = $this->modx->getObject('transport.modTransportPackage', $signature); $resolution = $package->findResolution($name, $constraints); $resolution = $resolution[0]; $this->signature = $resolution['signature']; $this->location = $resolution['location']; return parent::initialize(); }
public function initialize() { $this->setProperties(array("time_limit" => 240)); return parent::initialize(); }
public function initialize() { $this->setProperties(array("failure_page" => (int) $this->modx->getOption('modhybridauth.failure_page'), "registration_page" => (int) $this->modx->getOption('modhybridauth.registration_page_id'))); return parent::initialize(); }
public function initialize() { $this->setDefaultProperties(array('startId' => 0, 'excludeDocs' => array(), 'showHidden' => true, 'showUnpub' => false, 'showDeleted' => false, 'showHome' => false)); return parent::initialize(); }
public function initialize() { $this->setDefaultProperties(array('quantity' => 1, 'success_message' => 'Товар успешно добавлен в корзину')); return parent::initialize(); }
public function initialize() { $this->setProperties(array("failure_page" => 107)); return parent::initialize(); }
public function initialize() { //print_r($this->getProperties()); if ($data = $this->modx->fromJSON($this->getProperty('data'))) { $this->setDefaultProperties($data); } //print_r($this->getProperties()); if (!(int) $this->getProperty('parent')) { return 'Не был получен ID модели'; } if (!($old_price = (int) $this->getProperty('old_price'))) { return 'Не была получена старая цена'; } if (!($sm_price = (int) $this->getProperty('sm_price'))) { return 'Не была получена новая цена'; } return parent::initialize(); }
public function initialize() { $this->setDefaultProperties(array('startId' => !empty($this->modx->resource->id) ? $this->modx->resource->id : 0, 'id' => 'menu', 'cacheable' => false, 'level' => 1, 'sortBy' => 'menuindex', 'sortOrder' => 'ASC', 'levelClass' => '', 'activeClass' => 'active', 'ignoreHidden' => false, 'showUnpublished' => false, 'hideSubMenus' => false)); return parent::initialize(); }
public function initialize() { $this->setDefaultProperties(array('cache' => 1, 'cache_lifetime' => 0, 'cache_prefix' => 'getdata/', "path" => "/")); return parent::initialize(); }
public function initialize() { if (!$this->getProperty('resource')) { return 'Не были получены данные ресурса'; } $this->setDefaultProperties(array('trunc' => 1, 'splitter' => '<!-- splitter -->', 'truncLen' => 300, 'truncOffset' => 0, 'truncsplit' => '<!-- splitter -->', 'truncChars' => true, 'output_charset' => $this->modx->getOption('modx_charset'), 'endTags' => '…')); $this->output_charset = $this->getProperty('output_charset'); return parent::initialize(); }
public function initialize() { $this->bigbrother = $this->modx->bigbrother; return parent::initialize(); }
public function initialize() { $this->setDefaultProperties(array("sort" => "pagetitle", "dir" => "ASC", "limit" => 0, "steps" => 5)); return parent::initialize(); }
public function initialize() { $this->setDefaultProperties(array('limit' => 0, 'start' => 0, 'namespace' => 'core', 'language' => 'en')); return parent::initialize(); }