/** * @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; }
/** * @param Empresa $empresa */ public function removeEmpresa($empresa) { if ($this->empresas->contains($empresa)) { $empresa->setDirector(null); $this->empresas->removeElement($empresa); } }
/** * @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'); } }
/** * {@inheritdoc} */ public function removeTerm(TermInterface $term) { if ($this->hasOption($term)) { $this->terms->removeElement($term); } return $this; }
/** * 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); } }
/** * Remove articles * * @param Article $article */ public function removeArticle(Article $article) { if ($this->articles->contains($article)) { $this->articles->removeElement($article); $article->removeCitation($this); } }
/** * {@inheritdoc} */ public function removeImage(TaxonImageInterface $image) { if ($this->hasImage($image)) { $image->setTaxon(null); $this->images->removeElement($image); } }
/** * @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; }
protected function synchronizeOptions(Collection $options) { $this->options->map(function (VariantOptionInterface $option) use($options) { if (false === $options->contains($option)) { $this->options->removeElement($option); } }); }
/** * 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; }
/** * @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; }
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; }
/** * {@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; }
/** * {@inheritdoc} */ public function removeUnit(ShipmentUnitInterface $unit) { if ($this->hasUnit($unit)) { $unit->setShipment(null); $this->units->removeElement($unit); } }
/** * {@inheritdoc} */ public function removeProvince(ProvinceInterface $province) { if ($this->hasProvince($province)) { $this->provinces->removeElement($province); $province->setCountry(null); } }
/** * {@inheritdoc} */ public function removeItem(ShipmentItemInterface $item) { if ($this->hasItem($item)) { $item->setShipment(null); $this->items->removeElement($item); } }
/** * {@inheritdoc} */ public function removeValue(OptionValueInterface $value) { if ($this->hasValue($value)) { $this->values->removeElement($value); $value->setOption(null); } }
/** * Remove requestProductItem * * @param RequestProductItem $requestProductItem * @return RequestProduct */ public function removeRequestProductItem(RequestProductItem $requestProductItem) { if ($this->requestProductItems->contains($requestProductItem)) { $this->requestProductItems->removeElement($requestProductItem); } return $this; }
/** * {@inheritdoc} */ public function removePromotion(BasePromotionInterface $promotion) { if ($this->hasPromotion($promotion)) { $this->promotions->removeElement($promotion); } return $this; }
/** * {@inheritdoc} */ public function removeAdjustment(AdjustmentInterface $adjustment) { if (!$adjustment->isLocked() && $this->hasAdjustment($adjustment)) { $adjustment->setAdjustable(null); $this->adjustments->removeElement($adjustment); } }
/** * @param Role $role * @return $this */ public function removeRole(Role $role) { if ($this->roles->contains($role)) { $this->roles->removeElement($role); } return $this; }
/** * {@inheritdoc} */ public function removeRate(TaxRateInterface $rate) { if ($this->hasRate($rate)) { $rate->setCategory(null); $this->rates->removeElement($rate); } }
/** * {@inheritdoc} */ public function removeChild(TaxonInterface $taxon) { if ($this->hasChild($taxon)) { $taxon->setParent(null); $this->children->removeElement($taxon); } }
/** * 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; }
/** * @param Group $group */ public function removeGroup(Group $group) { if ($this->groups->contains($group)) { $this->groups->removeElement($group); $group->removeAccount($this); } }
/** * {@inheritdoc} */ public function removeAssociation(ProductAssociationInterface $association) { if ($this->hasAssociation($association)) { $association->setOwner(null); $this->associations->removeElement($association); } }