/** * @param ChildProvider $provider The ChildProvider object to add. */ protected function doAddProvider(ChildProvider $provider) { $this->collProviders[] = $provider; $provider->setFile($this); }
/** * Exclude object from result * * @param ChildProvider $provider Object to remove from the list of results * * @return $this|ChildProviderQuery The current query, for fluid interface */ public function prune($provider = null) { if ($provider) { $this->addUsingAlias(ProviderTableMap::COL_PROVIDER_ID, $provider->getProviderId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \App\Propel\Provider object * * @param \App\Propel\Provider|ObjectCollection $provider the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceQuery The current query, for fluid interface */ public function filterByProvider($provider, $comparison = null) { if ($provider instanceof \App\Propel\Provider) { return $this->addUsingAlias(ResourceTableMap::COL_RESOURCE_ID, $provider->getResourceId(), $comparison); } elseif ($provider instanceof ObjectCollection) { return $this->useProviderQuery()->filterByPrimaryKeys($provider->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByProvider() only accepts arguments of type \\App\\Propel\\Provider or Collection'); } }
/** * 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); }