public function init() { parent::init(); $this->emails = ['*****@*****.**', '*****@*****.**', '*****@*****.**']; $this->schedule = [['day' => '27.02.2015', 'user_id' => 31, 'priority' => 1, 'enable' => 1], ['day' => '27.02.2015', 'user_id' => 33, 'priority' => 2, 'enable' => 0]]; $this->questions = [['question' => 'test1', 'answers' => [['right' => 0, 'answer' => 'test1'], ['right' => 1, 'answer' => 'test2']]]]; }
/** * @inheritdoc * * Model MUST be provided on object creation. * * @throws InvalidConfigException */ public function init() { parent::init(); if ($this->model === null) { throw new InvalidConfigException('Model must be provided on object creation'); } }
public function init() { parent::init(); foreach (Yii::$app->request->cookies->getValue('cart', []) as $item) { $this->add($item); } }
/** * @inheritdoc */ public function init() { parent::init(); $settingsManager = Yii::$app->settings; $this->type = $settingsManager->get('cache.class'); $this->expireTime = $settingsManager->get('cache.expireTime'); }
/** * Initialization * Set default values * @return void */ public function init() { parent::init(); if ($this->item !== null) { $this->setAttributes(['name' => $this->item->name, 'description' => $this->item->description], false); } }
/** * @inheritdoc */ public function init() { parent::init(); if (!$this->id) { $this->id = Inflector::slug($this->label); } }
public function init() { parent::init(); if (is_array($this->publication)) { $this->publication = new Publication($this->publication); } }
/** * @inheritdoc */ public function init() { parent::init(); if (($object = $this->object) !== null) { $this->setAttributes($object->getAttributes(['title', 'alias']), false); } }
public function init() { parent::init(); if (\Yii::$app->request->isAjax) { $this->setResponseFormatJson(); } }
public function init() { parent::init(); // Setting default values $this->welcome_popup_title = 'Welcome'; $this->welcome_popup_content = 'Welcome content'; }
public function init() { $module = null; Module::validateConfig($module); $this->_settings = $module->loginSettings; parent::init(); }
public function init() { parent::init(); $this->year = date('Y'); $this->operator = self::OPERATOR_ALL; $this->type = self::TYPE_OVERRUN; }
public function __construct(array $properties = array()) { parent::init(); foreach ($properties as $key => $value) { $this->{$key} = $value; } }
/** * */ public function init() { parent::init(); $this->timezone = (new DateTimeZone('Europe/Kaliningrad'))->getOffset(new \DateTime()) / 60; $this->version = \Yii::$app->version; $this->bundle = 'com.example.app'; }
public function init() { parent::init(); $mm = \Yii::$app->mailmaster; $this->setListID(ArrayHelper::getValue($mm, 'forms.' . $this->formReplaceID . '.listID')); $this->setFormID(ArrayHelper::getValue($mm, 'forms.' . $this->formReplaceID . '.formID')); }
public function init() { parent::init(); if ($this->type === null) { throw new InvalidConfigException("The 'type' property must be set."); } }
public function init() { $this->enableDate = date('Y-m-d H:i'); $this->disableDate = date('Y-m-d H:i', time() + 365 * 86400); parent::init(); // TODO: Change the autogenerated stub }
public function init() { // Fire Event #if ($this->hasEventHandler('onInit')) # $this->onInit(new CEvent($this)); return parent::init(); }
public function init() { parent::init(); $this->populateQuotes(); $this->chooseQuote(); //$this->refreshQuoteFile(); }
/** * @inheritdoc */ public function init() { parent::init(); if (($object = $this->object) !== null) { $this->setAttributes($object->getAttributes(['url', 'title', 'keywords', 'description', 'snippet']), false); } }
public function init() { parent::init(); $this->on(Model::EVENT_AFTER_VALIDATE, function () { $this->requireResourceAvailable(); }); }
/** * @inheritdoc */ public function init() { $this->role = Rbac::getUserRoleName($this->_user->primaryKey); Yii::setAlias('@rbac', dirname(__DIR__)); Yii::$app->i18n->translations['rbac'] = ['class' => PhpMessageSource::className(), 'basePath' => '@rbac/messages']; parent::init(); }
/** * @inheritdoc */ public function init() { parent::init(); if (empty($this->apiServerKey)) { throw new InvalidConfigException('A Google api server key must be provided'); } }
public function init() { parent::init(); $this->on(Model::EVENT_BEFORE_VALIDATE, function () { $this->requireAdmin(); }); }
public function init() { $this->secsInDay = 60 * 60 * 24; $this->jsObject = []; $this->booking_status_id = Types::$bookingStatus['confirmed']['id']; $this->all_day_option_id = Types::$boolean['false']['id']; return parent::init(); }
public function init() { parent::init(); $this->on(Model::EVENT_AFTER_VALIDATE, function () { $this->requireEventNotFinish(); $this->requireTimeReliable(); }); }
/** * @inheritdoc * Set default values */ public function init() { parent::init(); $this->active = true; if ($this->item !== null) { $this->setAttributes(['title' => $this->item->title, 'active' => $this->item->active, 'content' => $this->item->content], false); } }
public function init() { parent::init(); // company.tax.irs $this->year = date('Y'); $this->from_month = date('m') - 1 - \app\helpers\Linet3Helper::getSetting('company.tax.irs'); $this->to_month = date('m') - 1; }
/** * @inheritdoc */ public function init() { parent::init(); /** @var \yii\i18n\Formatter $Formatter */ $Formatter = \Yii::$app->get('formatter'); $this->created_at = $Formatter->asTimestamp(time()); $this->updated_at = $Formatter->asTimestamp(time()); }
public function init() { $this->email = $this->_user->email; $this->name = $this->_profile->name; $this->surname = $this->_profile->surname; $this->avatar = $this->_profile->avatar; parent::init(); }