Exemple #1
0
 protected function ensureDoesNotExist($model)
 {
     if ($this->has($model)) {
         $this->related->remove($model);
         parent::ensureDoesNotExist($model);
     }
 }
Exemple #2
0
 protected function ensureDoesNotExist($model)
 {
     if ($this->related === $model) {
         $this->related = NULL;
         parent::ensureDoesNotExist($model);
     }
 }
Exemple #3
0
 /**
  * Set a given association
  *
  * @param String $name Name of the association
  * @param Association $association Association to set
  * @return $this
  */
 public function setAssociation($name, Association $association)
 {
     $association->setFacade($this->getModelFacade());
     $this->_associations[$name] = $association;
     return $this;
 }