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');
     }
 }
Beispiel #3
0
 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');
 }
Beispiel #5
0
 /**
  * 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);
     }
 }
Beispiel #6
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     if (!$this->id) {
         $this->id = Inflector::slug($this->label);
     }
 }
Beispiel #7
0
 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);
     }
 }
Beispiel #9
0
 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';
 }
Beispiel #11
0
 public function init()
 {
     $module = null;
     Module::validateConfig($module);
     $this->_settings = $module->loginSettings;
     parent::init();
 }
Beispiel #12
0
 public function init()
 {
     parent::init();
     $this->year = date('Y');
     $this->operator = self::OPERATOR_ALL;
     $this->type = self::TYPE_OVERRUN;
 }
Beispiel #13
0
 public function __construct(array $properties = array())
 {
     parent::init();
     foreach ($properties as $key => $value) {
         $this->{$key} = $value;
     }
 }
Beispiel #14
0
 /**
  *
  */
 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'));
 }
Beispiel #16
0
 public function init()
 {
     parent::init();
     if ($this->type === null) {
         throw new InvalidConfigException("The 'type' property must be set.");
     }
 }
Beispiel #17
0
 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
 }
Beispiel #18
0
 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();
 }
Beispiel #20
0
 /**
  * @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');
     }
 }
Beispiel #24
0
 public function init()
 {
     parent::init();
     $this->on(Model::EVENT_BEFORE_VALIDATE, function () {
         $this->requireAdmin();
     });
 }
Beispiel #25
0
 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();
     });
 }
Beispiel #27
0
 /**
  * @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);
     }
 }
Beispiel #28
0
 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;
 }
Beispiel #29
0
 /**
  * @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());
 }
Beispiel #30
0
 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();
 }