本文整理汇总了PHP中modObjectCreateProcessor::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP modObjectCreateProcessor::initialize方法的具体用法?PHP modObjectCreateProcessor::initialize怎么用?PHP modObjectCreateProcessor::initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类modObjectCreateProcessor
的用法示例。
在下文中一共展示了modObjectCreateProcessor::initialize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
public function initialize()
{
$this->setDefaultProperties(array('class_key' => $this->classKey, 'blocked' => false, 'active' => false));
$this->classKey = $this->getProperty('class_key', 'modUser');
$this->setProperty('blocked', $this->getProperty('blocked') ? true : false);
return parent::initialize();
}
示例2: initialize
/** {@inheritDoc} */
public function initialize()
{
if (!$this->modx->hasPermission($this->permission)) {
return $this->modx->lexicon('access_denied');
}
return parent::initialize();
}
示例3: initialize
public function initialize()
{
if (!(int) $this->getProperty('product_id')) {
return 'Не был указан ID товара';
}
return parent::initialize();
}
示例4: initialize
public function initialize()
{
$this->setUserId();
$this->setCreateTime();
$this->setCreatedByName();
return parent::initialize();
}
示例5: initialize
public function initialize()
{
if (!($this->historyFile = $this->modx->msrevaluation->process())) {
$this->failure($this->modx->msrevaluation->error);
}
return parent::initialize();
}
示例6: initialize
/** {@inheritDoc} */
public function initialize()
{
/** @var mlmsystem $mlmsystem */
$this->MlmSystem = $this->modx->getService('mlmsystem');
$this->MlmSystem->initialize($this->getProperty('context', $this->modx->context->key));
return parent::initialize();
}
示例7: initialize
public function initialize()
{
$classKey = $this->getProperty('class_key');
if (empty($classKey)) {
$this->setProperty('class_key', 'sources.modFileMediaSource');
}
return parent::initialize();
}
示例8: initialize
/**
* {@inheritDoc}
* @return boolean
*/
public function initialize()
{
$name = $this->getProperty('name');
if (empty($name)) {
$this->addFieldError('name', $this->modx->lexicon('virtunewsletter.category_err_ns_name'));
}
return parent::initialize();
}
示例9: initialize
public function initialize()
{
if (!$this->getProperty('username')) {
return 'Не указан пользователь';
}
$this->setDefaultProperties(array('userid' => $this->modx->user->id, "rank" => 0));
return parent::initialize();
}
示例10: initialize
public function initialize()
{
$this->classKey = $this->getProperty('type');
if (!$this->classKey) {
return $this->modx->lexicon($this->objectType . '_type_err_ns');
}
return parent::initialize();
}
示例11: initialize
/**
* {@inheritDoc}
* @return boolean
*/
public function initialize()
{
$this->context = $this->modx->getContext($this->getProperty('fk'));
if (empty($this->context)) {
return $this->modx->lexicon('setting_err_nf');
}
return parent::initialize();
}
示例12: initialize
public function initialize()
{
$this->setDefaultProperties(array("target_class" => "modResource"));
if (!(int) $this->getProperty('target_id')) {
return 'Не был указан ID целевого объекта';
}
if (!$this->getProperty('target_class')) {
return 'Не был указан класс целевого объекта';
}
return parent::initialize();
}
示例13: initialize
public function initialize()
{
$this->BillingProcessorsPath = MODX_CORE_PATH . 'components/billing/processors/';
$this->setDefaultProperties(array('currency_id' => $this->modx->getOption('shopmodx.default_currency')));
if (!$this->getProperty('paysystem_id')) {
$error = "Не был получен ID платежной системы";
$this->error($error);
return $this->getResponseError($error);
}
$this->setProperties(array("allow_partial_payment" => $this->modx->getOption('shop.allow_partial_payment', null, false)));
return parent::initialize();
}
示例14: initialize
/**
* {@inheritDoc}
* @return boolean
*/
public function initialize()
{
$name = $this->getProperty('name');
if (empty($name)) {
return $this->modx->lexicon('bbbx.config_err_ns_name');
}
$configs = $this->getProperty('configs');
if (empty($configs)) {
return $this->modx->lexicon('bbbx.config_err_ns_configs');
}
$this->unsetProperty('action');
return parent::initialize();
}
示例15: initialize
public function initialize()
{
$this->xmlFiles = array('treeWithoutProducts.xml', 'stock.xml', 'filters.xml', 'catalogue.xml');
$api_user = $this->modx->getOption('msgiftsrusynch_api_user', null, '');
$api_password = $this->modx->getOption('msgiftsrusynch_api_password', null, '');
if ($api_user == '' || $api_password == '') {
return $this->modx->lexicon('msgiftsrusynch_item_err_api_login');
}
$this->url_gifts_api = "http://" . $api_user . ":" . $api_password . "@api2.gifts.ru/export/v2/catalogue/";
$api_page_content = file_get_contents($this->url_gifts_api . $this->xmlFiles[0]);
if (strstr($api_page_content, '<title>401</title>') || strstr($api_page_content, 'You can change')) {
return $this->modx->lexicon('msgiftsrusynch_item_err_api_ip');
}
return parent::initialize();
}