Exemplo n.º 1
0
 public function afterFind()
 {
     if (strpos($this->email_recipient, ',')) {
         $this->email_recipient = implode(',', json_decode($this->email_recipient));
     }
     return parent::afterFind();
 }
Exemplo n.º 2
0
 public function afterFind()
 {
     parent::afterFind();
     if ($this->linkdata) {
         $this->linkdata = iconv('cp949', 'utf-8//IGNORE', $this->linkdata);
     }
     if ($this->linkdata2) {
         $this->linkdata2 = iconv('cp949', 'utf-8//IGNORE', $this->linkdata2);
     }
     if ($this->filedata1) {
         $this->filedata1 = iconv('cp949', 'utf-8//IGNORE', $this->filedata1);
     }
     if ($this->jungjungdata) {
         $this->jungjungdata = iconv('cp949', 'utf-8//IGNORE', $this->jungjungdata);
     }
     if ($this->maincontents) {
         $this->maincontents = iconv('cp949', 'utf-8//IGNORE', $this->maincontents);
     }
     if ($this->urlinfo1) {
         $this->urlinfo1 = iconv('cp949', 'utf-8//IGNORE', $this->urlinfo1);
     }
     if ($this->urlinfo2) {
         $this->urlinfo2 = iconv('cp949', 'utf-8//IGNORE', $this->urlinfo2);
     }
     if ($this->openbid_contents) {
         $this->openbid_contents = iconv('cp949', 'utf-8//IGNORE', $this->openbid_contents);
     }
 }
Exemplo n.º 3
0
 public function afterFind()
 {
     parent::afterFind();
     $this->configuration = self::loadConfig($this->config);
     $this->getTests();
     $this->checkLogging();
 }
Exemplo n.º 4
0
 /**
  * @inheritdoc
  */
 public function afterFind()
 {
     parent::afterFind();
     if (empty($this->description)) {
         $this->description = Inflector::camel2words($this->name, true);
     }
 }
Exemplo n.º 5
0
 public function afterFind()
 {
     parent::afterFind();
     if ($this->constno) {
         $this->constno = iconv('cp949', 'utf-8', $this->constno);
     }
     if ($this->refno) {
         $this->refno = iconv('cp949', 'utf-8', $this->refno);
     }
     if ($this->realorg) {
         $this->realorg = iconv('cp949', 'utf-8', $this->realorg);
     }
     if ($this->charger) {
         $this->charger = iconv('cp949', 'utf-8', $this->charger);
     }
     if ($this->bidperm) {
         $this->bidperm = iconv('cp949', 'utf-8', $this->bidperm);
     }
     if ($this->bidqorg) {
         $this->bidqorg = iconv('cp949', 'utf-8', $this->bidqorg);
     }
     if ($this->origin_lnk) {
         $this->origin_lnk = iconv('cp949', 'utf-8', $this->origin_lnk);
     }
     if ($this->attchd_lnk) {
         $this->attchd_lnk = iconv('cp949', 'utf-8', $this->attchd_lnk);
     }
     if ($this->perm) {
         $this->perm = iconv('cp949', 'utf-8', $this->perm);
     }
 }
Exemplo n.º 6
0
 public function afterFind()
 {
     if ($this->getNgRestCallType() == 'list') {
         $this->trigger(self::EVENT_AFTER_NGREST_FIND);
     }
     return parent::afterFind();
 }
Exemplo n.º 7
0
 public function afterFind()
 {
     parent::afterFind();
     $scheme = static::getTableSchema();
     foreach ($scheme->columns as $column) {
         if (static::isSpatial($column)) {
             $field = $column->name;
             $attr = $this->getAttribute($field);
             // get WKT
             if ($attr) {
                 if (YII_DEBUG && preg_match('/[\\x80-\\xff]+/', $attr)) {
                     /* If you get an exception here, it probably means you have overridden find()
                        and did not return sjaakp\spatial\ActiveQuery. */
                     throw new InvalidCallException('Spatial attribute not converted.');
                 }
                 $geom = SpatialHelper::wktToGeom($attr);
                 // Transform geometry FeatureCollection...
                 if ($geom['type'] == 'GeometryCollection') {
                     $feats = [];
                     foreach ($geom['geometries'] as $g) {
                         $feats[] = ['type' => 'Feature', 'geometry' => $g, 'properties' => $this->featureProperties($field, $g)];
                     }
                     $feature = ['type' => 'FeatureCollection', 'features' => $feats];
                 } else {
                     // ... or to Feature
                     $feature = SpatialHelper::geomToFeature($geom, $this->featureProperties($field, $geom));
                 }
                 $this->setAttribute($field, Json::encode($feature));
             }
         }
     }
 }
Exemplo n.º 8
0
 public function afterFind()
 {
     parent::afterFind();
     if ($this->hasAttribute("created_at")) {
         $this->created_at = \Yii::$app->formatter->asRelativeTime($this->created_at);
     }
 }
Exemplo n.º 9
0
 public function afterFind()
 {
     $this->name = $this->object->name;
     $this->loadTags();
     $this->determineAccess();
     return parent::afterFind();
 }
Exemplo n.º 10
0
 public function afterFind()
 {
     parent::afterFind();
     if ($this->name) {
         $this->name = iconv('euckr', 'utf-8', $this->name);
     }
 }
Exemplo n.º 11
0
 public function afterFind()
 {
     parent::afterFind();
     if ($this->gname) {
         $this->gname = iconv('cp949', 'utf-8', $this->gname);
     }
     if ($this->gorg) {
         $this->gorg = iconv('cp949', 'utf-8', $this->gorg);
     }
     if ($this->standard) {
         $this->standard = iconv('cp949', 'utf-8', $this->standard);
     }
     if ($this->unit) {
         $this->unit = iconv('cp949', 'utf-8', $this->unit);
     }
     if ($this->unitcost) {
         $this->unitcost = iconv('cp949', 'utf-8', $this->unitcost);
     }
     if ($this->period) {
         $this->period = iconv('cp949', 'utf-8', $this->period);
     }
     if ($this->place) {
         $this->place = iconv('cp949', 'utf-8', $this->place);
     }
     if ($this->condition) {
         $this->condition = iconv('cp949', 'utf-8', $this->condition);
     }
 }
Exemplo n.º 12
0
 public function afterFind()
 {
     parent::afterFind();
     if ($this->g2bname) {
         $this->g2bname = iconv('cp949', 'utf-8', $this->g2bname);
     }
 }
Exemplo n.º 13
0
 public function afterFind()
 {
     parent::afterFind();
     if ($this->realorg) {
         $this->realorg = iconv('cp949', 'utf-8', $this->realorg);
     }
 }
Exemplo n.º 14
0
 public function afterFind()
 {
     parent::afterFind();
     if ($this->g2b_code_nm) {
         $this->g2b_code_nm = iconv('euckr', 'utf-8', $this->g2b_code_nm);
     }
 }
Exemplo n.º 15
0
 public function afterFind()
 {
     parent::afterFind();
     $empresasUsuarios = EmpresasUsuarios::findAll(['usuario_id' => $this->id]);
     $this->empresa_id = \yii\helpers\ArrayHelper::getColumn($empresasUsuarios, 'empresa_id');
     $this->user_role = \yii\helpers\ArrayHelper::getColumn(Yii::$app->authManager->getRolesByUser($this->id), 'name');
 }
 /**
  * Catch the afterFind event to load the meta data if the
  * $autoLoadMetaData flag is set to true
  *
  */
 public function afterFind()
 {
     if ($this->autoLoadMetaData) {
         $this->loadMetaData();
     }
     parent::afterFind();
 }
Exemplo n.º 17
0
 public function afterFind()
 {
     parent::afterFind();
     if ($this->bidcomment_mod) {
         $this->bidcomment_mod = iconv('euckr', 'utf-8//IGNORE', $this->bidcomment_mod);
     }
     if ($this->bidcomment) {
         $this->bidcomment = iconv('euckr', 'utf-8//IGNORE', $this->bidcomment);
     }
     if ($this->bid_html) {
         $this->bid_html = iconv('euckr', 'utf-8//IGNORE', $this->bid_html);
     }
     if ($this->nbidcomment) {
         $this->nbidcomment = iconv('euckr', 'utf-8//IGNORE', $this->nbidcomment);
     }
     if ($this->nbid_html) {
         $this->nbid_html = iconv('euckr', 'utf-8//IGNORE', $this->nbid_html);
     }
     if ($this->bid_file) {
         $this->bid_file = iconv('euckr', 'utf-8//IGNORE', $this->bid_file);
     }
     if ($this->nbid_file) {
         $this->nbid_file = iconv('euckr', 'utf-8//IGNORE', $this->nbid_file);
     }
     if ($this->attchd_lnk) {
         $this->attchd_lnk = iconv('euckr', 'utf-8//IGNORE', $this->attchd_lnk);
     }
 }
Exemplo n.º 18
0
 public function afterFind()
 {
     parent::afterFind();
     if ($this->notinum) {
         $this->notinum = iconv('cp949', 'utf-8', $this->notinum);
     }
     if ($this->constname) {
         $this->constname = iconv('cp949', 'utf-8', $this->constname);
     }
     if ($this->org) {
         $this->org = iconv('cp949', 'utf-8', $this->org);
     }
     if ($this->constract) {
         $this->constract = iconv('cp949', 'utf-8', $this->constract);
     }
     if ($this->ibchalbangsik) {
         $this->ibchalbangsik = iconv('cp949', 'utf-8', $this->ibchalbangsik);
     }
     if ($this->lockeyword) {
         $this->lockeyword = iconv('cp949', 'utf-8', $this->lockeyword);
     }
     if ($this->commentoption) {
         $this->commentoption = iconv('cp949', 'utf-8', $this->commentoption);
     }
     if ($this->successname) {
         $this->successname = iconv('cp949', 'utf-8', $this->successname);
     }
 }
Exemplo n.º 19
0
 public function afterFind()
 {
     parent::afterFind();
     $this->kaoshishijian = date('Y-m-d', $this->kaoshishijian);
     $this->baomingshijian = date('Y-m-d', $this->baomingshijian);
     $this->jiezhishijian = date('Y-m-d', $this->jiezhishijian);
 }
Exemplo n.º 20
0
 /**
  * Performs some afterFind stuff like casting variables to correct type
  */
 public function afterFind()
 {
     parent::afterFind();
     $boolArguments = ['is_repeating_task', 'notify_initiator', 'email_notification', 'delete_after_run'];
     foreach ($boolArguments as $argument) {
         $this->{$argument} = boolval($this->{$argument});
     }
 }
Exemplo n.º 21
0
 /**
  * after find
  * @return parent
  */
 public function afterFind()
 {
     $rel_pat=Patients::find()->where(['firm_id'=>$this->id])->one();
     if($rel_pat) {
         $this->talon=$rel_pat->talon;
     }
     return parent::afterFind();
 }
Exemplo n.º 22
0
 /**
  * @inheritdoc
  */
 public function afterFind()
 {
     parent::afterFind();
     if (!$this->isNewRecord) {
         // Populate categories id array after find
         $this->assignedCategories = ArrayHelper::map($this->postCategories, 'category_id', 'category_id');
     }
 }
Exemplo n.º 23
0
 public function afterFind()
 {
     parent::afterFind();
     $parent = (new \yii\db\Query())->select('parent')->where(['child' => $this->name])->from(\Yii::$app->authManager->itemChildTable)->scalar();
     if ($parent) {
         $this->parent = $parent;
     }
 }
Exemplo n.º 24
0
 public function afterFind()
 {
     if (isset($this->created_by)) {
         $this->username = $this->createdBy->username;
         $this->email = $this->createdBy->email;
     }
     return parent::afterFind();
 }
Exemplo n.º 25
0
 public function afterFind()
 {
     $this->params = !empty($this->params) ? Json::decode($this->params) : [];
     if ($this->type !== null && is_file(Yii::getAlias('@worstinme/zoo') . '/elements/' . $this->type . '/Config.php')) {
         $element = '\\worstinme\\zoo\\elements\\' . $this->type . '\\Config';
         $this->attachBehaviors([$element::className()]);
     }
     return parent::afterFind();
 }
Exemplo n.º 26
0
 /**
  * @inheritdoc
  */
 public function afterFind()
 {
     parent::afterFind();
     $this->loadOption(Yii::$app->get('yii2options')->getOption($this->key));
     $this->value = unserialize(base64_decode($this->value));
     if (is_callable($this->afterFind)) {
         call_user_func_array($this->afterFind, [$this, 'afterFind']);
     }
 }
Exemplo n.º 27
0
 /**
  * @inheritdoc
  */
 public function afterFind()
 {
     try {
         $this->meta_data = unserialize($this->meta_data);
     } catch (\Exception $e) {
         $this->meta_data = null;
     }
     parent::afterFind();
 }
Exemplo n.º 28
0
 public function afterFind()
 {
     parent::afterFind();
     if (empty($this->icon)) {
         $this->icon = '/images/me.png';
     }
     //        elseif(strpos($this->icon,'http://')===false )
     //            $this->icon = '/file/glide?h=150&w=150&fit=crop&path='.$this->icon;
 }
Exemplo n.º 29
0
 public function afterFind()
 {
     if (parent::afterFind()) {
         $this->name = htmlspecialchars_decode($this->name);
         return true;
     } else {
         return false;
     }
 }
Exemplo n.º 30
0
 public function afterFind()
 {
     parent::afterFind();
     if ($this->officename) {
         $this->officename = iconv('cp949', 'utf-8', $this->officename);
     }
     if ($this->pre_name) {
         $this->pre_name = iconv('cp949', 'utf-8', $this->pre_name);
     }
 }