コード例 #1
0
 public function populateModel(&$model)
 {
     assert('$model instanceof Contact');
     parent::populateModel($model);
     $domainName = static::resolveDomainName($model);
     $source = RandomDataUtil::getRandomValueFromArray(static::getCustomFieldDataByName('LeadSources'));
     $industry = RandomDataUtil::getRandomValueFromArray(static::getCustomFieldDataByName('Industries'));
     $model->website = static::makeUrlByDomainName($domainName);
     $model->source->value = $source;
     $model->industry->value = $industry;
 }
コード例 #2
0
 public function populateModel(&$model)
 {
     assert('$model instanceof User');
     parent::populateModel($model);
     $model->language = Yii::app()->language;
     $model->timeZone = Yii::app()->timeZoneHelper->getGlobalValue();
     $currencies = Currency::getAll();
     $model->currency = $currencies[0];
 }