public function beforeValidate() { if (!isset($this->icon_url)) { $this->icon_url = 'http://google.com/insert_here'; } return parent::beforeValidate(); }
/** * Returns the static model of the specified AR class. * @return TrucksTweets the static model class */ public static function model($className = __CLASS__) { return parent::model($className); }