Esempio n. 1
0
 /**
  * @param Archivo $archivo
  */
 public function removeArchivo($archivo)
 {
     if ($this->archivos->contains($archivo)) {
         $this->archivos->removeElement($archivo);
         $archivo->setDocumentable(null);
     }
 }
 /**
  * Remove a given option
  *
  * @param OptionInterface $option
  * @return $this
  */
 public function removeOption(OptionInterface $option)
 {
     if ($this->hasOption($option)) {
         $this->options->removeElement($option);
     }
     return $this;
 }
Esempio n. 3
0
 /**
  * @param Empresa $empresa
  */
 public function removeEmpresa($empresa)
 {
     if ($this->empresas->contains($empresa)) {
         $empresa->setDirector(null);
         $this->empresas->removeElement($empresa);
     }
 }
Esempio n. 4
0
 /**
  * @param AntiMattr\Common\Product\OptionInterface
  *
  * @throws OutOfBoundsException
  */
 public function removeOption(OptionInterface $option)
 {
     $success = $this->options->removeElement($option);
     if (!$success) {
         throw new OutOfBoundsException('Variation::options do not contain option to remove');
     }
 }
Esempio n. 5
0
 /**
  * {@inheritdoc}
  */
 public function removeTerm(TermInterface $term)
 {
     if ($this->hasOption($term)) {
         $this->terms->removeElement($term);
     }
     return $this;
 }
Esempio n. 6
0
 /**
  * Remove item.
  *
  * @param \SWP\Component\Bridge\Model\Item $item
  */
 public function removeItem(\SWP\Component\Bridge\Model\Item $item)
 {
     if ($this->items->contains($item)) {
         $this->items->removeElement($item);
         $item->setPackage(null);
     }
 }
Esempio n. 7
0
 /**
  * Remove articles
  *
  * @param Article $article
  */
 public function removeArticle(Article $article)
 {
     if ($this->articles->contains($article)) {
         $this->articles->removeElement($article);
         $article->removeCitation($this);
     }
 }
Esempio n. 8
0
 /**
  * {@inheritdoc}
  */
 public function removeImage(TaxonImageInterface $image)
 {
     if ($this->hasImage($image)) {
         $image->setTaxon(null);
         $this->images->removeElement($image);
     }
 }
Esempio n. 9
0
 /**
  * @param User $user
  */
 public function removeUser(User $user)
 {
     if (!$this->users->contains($user)) {
         return;
     }
     $this->users->removeElement($user);
     $user->removeGroup($this);
 }
 /**
  * Remove an attribute value
  *
  * @param AttributeValueInterface $attributeValue
  *
  * @return $this
  */
 public function removeAttributeValue(AttributeValueInterface $attributeValue)
 {
     if ($this->attributeValues->contains($attributeValue)) {
         $attributeValue->setSubject(null);
         $this->attributeValues->removeElement($attributeValue);
     }
     return $this;
 }
 /**
  * {@inheritdoc}
  */
 public function removeField(FieldValueInterface $field)
 {
     if ($this->hasField($field)) {
         $this->fields->removeElement($field);
         $field->setSubject(null);
     }
     return $this;
 }
Esempio n. 12
0
 protected function synchronizeOptions(Collection $options)
 {
     $this->options->map(function (VariantOptionInterface $option) use($options) {
         if (false === $options->contains($option)) {
             $this->options->removeElement($option);
         }
     });
 }
Esempio n. 13
0
 /**
  * Removes data if set previously
  *
  * @param string $key
  *
  * @return boolean
  */
 public function removeData($key)
 {
     $data = $this->findData($key);
     if (isset($data)) {
         $this->data->removeElement($data);
         return true;
     }
     return false;
 }
Esempio n. 14
0
 /**
  * @param ApplicationUser $user
  * @return bool
  */
 public function removeUser(ApplicationUser $user)
 {
     $bResult = true;
     if (!$this->users->contains($user)) {
         $bResult = false;
     }
     $this->users->removeElement($user);
     return $bResult;
 }
Esempio n. 15
0
 public function removeProduct(UuidIdentity $id)
 {
     $element = $this->lineItems->filter(function (LineItem $lineItem) use($id) {
         return $lineItem->getProduct()->getId()->getValue() === $id->getValue();
     })->first();
     if ($element) {
         $this->lineItems->removeElement($element);
     }
     return $this;
 }
Esempio n. 16
0
 /**
  * {@inheritdoc}
  */
 public function removeTranslation(LayoutTranslationInterface $translation)
 {
     if ($this->translations instanceof Collection) {
         if ($this->translations->contains($translation)) {
             $this->translations->removeElement($translation);
         }
     } else {
         unset($this->translations[$translation->getLocale()]);
     }
     return $this;
 }
Esempio n. 17
0
 /**
  * {@inheritdoc}
  */
 public function removeUnit(ShipmentUnitInterface $unit)
 {
     if ($this->hasUnit($unit)) {
         $unit->setShipment(null);
         $this->units->removeElement($unit);
     }
 }
Esempio n. 18
0
 /**
  * {@inheritdoc}
  */
 public function removeProvince(ProvinceInterface $province)
 {
     if ($this->hasProvince($province)) {
         $this->provinces->removeElement($province);
         $province->setCountry(null);
     }
 }
Esempio n. 19
0
 /**
  * {@inheritdoc}
  */
 public function removeItem(ShipmentItemInterface $item)
 {
     if ($this->hasItem($item)) {
         $item->setShipment(null);
         $this->items->removeElement($item);
     }
 }
Esempio n. 20
0
 /**
  * {@inheritdoc}
  */
 public function removeValue(OptionValueInterface $value)
 {
     if ($this->hasValue($value)) {
         $this->values->removeElement($value);
         $value->setOption(null);
     }
 }
Esempio n. 21
0
 /**
  * Remove requestProductItem
  *
  * @param RequestProductItem $requestProductItem
  * @return RequestProduct
  */
 public function removeRequestProductItem(RequestProductItem $requestProductItem)
 {
     if ($this->requestProductItems->contains($requestProductItem)) {
         $this->requestProductItems->removeElement($requestProductItem);
     }
     return $this;
 }
Esempio n. 22
0
 /**
  * {@inheritdoc}
  */
 public function removePromotion(BasePromotionInterface $promotion)
 {
     if ($this->hasPromotion($promotion)) {
         $this->promotions->removeElement($promotion);
     }
     return $this;
 }
Esempio n. 23
0
 /**
  * {@inheritdoc}
  */
 public function removeAdjustment(AdjustmentInterface $adjustment)
 {
     if (!$adjustment->isLocked() && $this->hasAdjustment($adjustment)) {
         $adjustment->setAdjustable(null);
         $this->adjustments->removeElement($adjustment);
     }
 }
Esempio n. 24
0
 /**
  * @param Role $role
  * @return $this
  */
 public function removeRole(Role $role)
 {
     if ($this->roles->contains($role)) {
         $this->roles->removeElement($role);
     }
     return $this;
 }
Esempio n. 25
0
 /**
  * {@inheritdoc}
  */
 public function removeRate(TaxRateInterface $rate)
 {
     if ($this->hasRate($rate)) {
         $rate->setCategory(null);
         $this->rates->removeElement($rate);
     }
 }
Esempio n. 26
0
 /**
  * {@inheritdoc}
  */
 public function removeChild(TaxonInterface $taxon)
 {
     if ($this->hasChild($taxon)) {
         $taxon->setParent(null);
         $this->children->removeElement($taxon);
     }
 }
Esempio n. 27
0
 /**
  * Remove categories
  *
  * @param \Jbig3Tryings\Crud\Mtm\Entity\Category $categories
  */
 public function removeCategory(Category $category)
 {
     if (!$this->categories->contains($category)) {
         return;
     }
     $this->categories->removeElement($category);
 }
 /**
  * {@inheritdoc}
  */
 public function removeElement($element)
 {
     $this->_initialize();
     $result = $this->_coll->removeElement($element);
     $this->_changed();
     return $result;
 }
Esempio n. 29
0
 /**
  * @param Group $group
  */
 public function removeGroup(Group $group)
 {
     if ($this->groups->contains($group)) {
         $this->groups->removeElement($group);
         $group->removeAccount($this);
     }
 }
Esempio n. 30
0
 /**
  * {@inheritdoc}
  */
 public function removeAssociation(ProductAssociationInterface $association)
 {
     if ($this->hasAssociation($association)) {
         $association->setOwner(null);
         $this->associations->removeElement($association);
     }
 }