Пример #1
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aUnit) {
         $this->aUnit->removeUnitI18n($this);
     }
     $this->unit_id = null;
     $this->locale = null;
     $this->unit_name = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Пример #2
0
 /**
  * Exclude object from result
  *
  * @param   ChildUnit $unit Object to remove from the list of results
  *
  * @return $this|ChildUnitQuery The current query, for fluid interface
  */
 public function prune($unit = null)
 {
     if ($unit) {
         $this->addUsingAlias(UnitTableMap::COL_UNIT_ID, $unit->getUnitId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Пример #3
0
 /**
  * Filter the query by a related \App\Propel\Unit object
  *
  * @param \App\Propel\Unit|ObjectCollection $unit The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildUnitI18nQuery The current query, for fluid interface
  */
 public function filterByUnit($unit, $comparison = null)
 {
     if ($unit instanceof \App\Propel\Unit) {
         return $this->addUsingAlias(UnitI18nTableMap::COL_UNIT_ID, $unit->getUnitId(), $comparison);
     } elseif ($unit instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(UnitI18nTableMap::COL_UNIT_ID, $unit->toKeyValue('PrimaryKey', 'UnitId'), $comparison);
     } else {
         throw new PropelException('filterByUnit() only accepts arguments of type \\App\\Propel\\Unit or Collection');
     }
 }
Пример #4
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aCategory) {
         $this->aCategory->removeProduct($this);
     }
     if (null !== $this->aProvider) {
         $this->aProvider->removeProduct($this);
     }
     if (null !== $this->aUnit) {
         $this->aUnit->removeProduct($this);
     }
     if (null !== $this->aFile) {
         $this->aFile->removeProduct($this);
     }
     if (null !== $this->aResource) {
         $this->aResource->removeProduct($this);
     }
     $this->product_id = null;
     $this->resource_id = null;
     $this->product_name = null;
     $this->product_description = null;
     $this->category_id = null;
     $this->provider_id = null;
     $this->unit_id = null;
     $this->product_range = null;
     $this->product_price = null;
     $this->product_is_active = null;
     $this->product_pic = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }