public function afterFind() { if ($this->type == self::TYPE_IFRAME || $this->type == self::TYPE_LINK) { $this->url = $this->content; } return parent::afterFind(); }
public function afterFind() { $this->content = Content::model()->findByAttributes(array('object_model' => get_class($this), 'object_id' => $this->getPrimaryKey())); if ($this->content !== null) { $this->content->setUnderlyingObject($this); } parent::afterFind(); }
public function afterFind() { parent::afterFind(); $categories = LiveCategoryItem::model()->findAllByAttributes(array('item_id' => $this->id)); $arrCat = array(); foreach ($categories as $cat) { $arrCat[] = $cat->category_id; } $this->categories = implode(",", $arrCat); }
public function afterFind() { $this->content = Content::model()->findByAttributes(array('object_model' => get_class($this), 'object_id' => $this->getPrimaryKey())); parent::afterFind(); }
public function afterFind() { if ($this->type == self::TYPE_IFRAME || $this->type == self::TYPE_LINK) { $this->url = $this->content; } if ($this->type == self::TYPE_MARKDOWN) { $this->markdown = $this->content; } if ($this->widget_targets != '') { $this->widget_targets = count(json_decode($this->widget_targets)) > 0 ? implode(', ', json_decode($this->widget_targets)) : json_decode($this->widget_targets); if (is_array($this->widget_targets)) { $targets = $this->widget_targets; $this->widget_targets = ''; foreach ($targets as $widget) { $this->widget_targets .= $widget; } } } return parent::afterFind(); }