Ejemplo n.º 1
0
 /**
  * @inheritdoc
  * @param ActiveRecord $owner
  */
 public function attach($owner)
 {
     $this->attribute = (array) $this->attribute;
     $primaryKey = $owner->primaryKey();
     $primaryKey = is_array($primaryKey) ? array_shift($primaryKey) : $primaryKey;
     if (in_array($primaryKey, $this->attribute, true) && $owner->getIsNewRecord()) {
         $this->attributes[ActiveRecord::EVENT_AFTER_INSERT] = $this->slugAttribute;
     }
     parent::attach($owner);
 }