예제 #1
0
 /**
  * @param Archivo $archivo
  */
 public function removeArchivo($archivo)
 {
     if ($this->archivos->contains($archivo)) {
         $this->archivos->removeElement($archivo);
         $archivo->setDocumentable(null);
     }
 }
예제 #2
0
 /**
  * Remove a given option
  *
  * @param OptionInterface $option
  * @return $this
  */
 public function removeOption(OptionInterface $option)
 {
     if ($this->hasOption($option)) {
         $this->options->removeElement($option);
     }
     return $this;
 }
예제 #3
0
 /**
  * @param Empresa $empresa
  */
 public function removeEmpresa($empresa)
 {
     if ($this->empresas->contains($empresa)) {
         $empresa->setDirector(null);
         $this->empresas->removeElement($empresa);
     }
 }
예제 #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');
     }
 }
예제 #5
0
 /**
  * {@inheritdoc}
  */
 public function removeTerm(TermInterface $term)
 {
     if ($this->hasOption($term)) {
         $this->terms->removeElement($term);
     }
     return $this;
 }
예제 #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);
     }
 }
예제 #7
0
 /**
  * Remove articles
  *
  * @param Article $article
  */
 public function removeArticle(Article $article)
 {
     if ($this->articles->contains($article)) {
         $this->articles->removeElement($article);
         $article->removeCitation($this);
     }
 }
예제 #8
0
 /**
  * {@inheritdoc}
  */
 public function removeImage(TaxonImageInterface $image)
 {
     if ($this->hasImage($image)) {
         $image->setTaxon(null);
         $this->images->removeElement($image);
     }
 }
예제 #9
0
파일: Group.php 프로젝트: asev/user_group
 /**
  * @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;
 }
예제 #11
0
 /**
  * {@inheritdoc}
  */
 public function removeField(FieldValueInterface $field)
 {
     if ($this->hasField($field)) {
         $this->fields->removeElement($field);
         $field->setSubject(null);
     }
     return $this;
 }
예제 #12
0
 protected function synchronizeOptions(Collection $options)
 {
     $this->options->map(function (VariantOptionInterface $option) use($options) {
         if (false === $options->contains($option)) {
             $this->options->removeElement($option);
         }
     });
 }
예제 #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;
 }
예제 #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;
 }
예제 #15
0
파일: Cart.php 프로젝트: igaponov/shop
 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;
 }
예제 #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;
 }
예제 #17
0
 /**
  * {@inheritdoc}
  */
 public function removeUnit(ShipmentUnitInterface $unit)
 {
     if ($this->hasUnit($unit)) {
         $unit->setShipment(null);
         $this->units->removeElement($unit);
     }
 }
예제 #18
0
 /**
  * {@inheritdoc}
  */
 public function removeProvince(ProvinceInterface $province)
 {
     if ($this->hasProvince($province)) {
         $this->provinces->removeElement($province);
         $province->setCountry(null);
     }
 }
예제 #19
0
파일: Shipment.php 프로젝트: sidibea/Sylius
 /**
  * {@inheritdoc}
  */
 public function removeItem(ShipmentItemInterface $item)
 {
     if ($this->hasItem($item)) {
         $item->setShipment(null);
         $this->items->removeElement($item);
     }
 }
예제 #20
0
파일: Option.php 프로젝트: aleherse/Sylius
 /**
  * {@inheritdoc}
  */
 public function removeValue(OptionValueInterface $value)
 {
     if ($this->hasValue($value)) {
         $this->values->removeElement($value);
         $value->setOption(null);
     }
 }
예제 #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;
 }
예제 #22
0
파일: Order.php 프로젝트: vikey89/Sylius
 /**
  * {@inheritdoc}
  */
 public function removePromotion(BasePromotionInterface $promotion)
 {
     if ($this->hasPromotion($promotion)) {
         $this->promotions->removeElement($promotion);
     }
     return $this;
 }
예제 #23
0
파일: Order.php 프로젝트: Hsidhu/Sylius
 /**
  * {@inheritdoc}
  */
 public function removeAdjustment(AdjustmentInterface $adjustment)
 {
     if (!$adjustment->isLocked() && $this->hasAdjustment($adjustment)) {
         $adjustment->setAdjustable(null);
         $this->adjustments->removeElement($adjustment);
     }
 }
예제 #24
0
파일: JournalUser.php 프로젝트: ojs/ojs
 /**
  * @param Role $role
  * @return $this
  */
 public function removeRole(Role $role)
 {
     if ($this->roles->contains($role)) {
         $this->roles->removeElement($role);
     }
     return $this;
 }
예제 #25
0
 /**
  * {@inheritdoc}
  */
 public function removeRate(TaxRateInterface $rate)
 {
     if ($this->hasRate($rate)) {
         $rate->setCategory(null);
         $this->rates->removeElement($rate);
     }
 }
예제 #26
0
파일: Taxon.php 프로젝트: loic425/Sylius
 /**
  * {@inheritdoc}
  */
 public function removeChild(TaxonInterface $taxon)
 {
     if ($this->hasChild($taxon)) {
         $taxon->setParent(null);
         $this->children->removeElement($taxon);
     }
 }
예제 #27
0
파일: Post.php 프로젝트: dulumao/big5
 /**
  * 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;
 }
예제 #29
0
파일: Account.php 프로젝트: zource/zource
 /**
  * @param Group $group
  */
 public function removeGroup(Group $group)
 {
     if ($this->groups->contains($group)) {
         $this->groups->removeElement($group);
         $group->removeAccount($this);
     }
 }
예제 #30
0
파일: Product.php 프로젝트: okwinza/Sylius
 /**
  * {@inheritdoc}
  */
 public function removeAssociation(ProductAssociationInterface $association)
 {
     if ($this->hasAssociation($association)) {
         $association->setOwner(null);
         $this->associations->removeElement($association);
     }
 }