コード例 #1
0
ファイル: ResourceQuery.php プロジェクト: mtornero/slowshop
 /**
  * Filter the query by a related \App\Propel\ResourceFile object
  *
  * @param \App\Propel\ResourceFile|ObjectCollection $resourceFile 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 filterByResourceFile($resourceFile, $comparison = null)
 {
     if ($resourceFile instanceof \App\Propel\ResourceFile) {
         return $this->addUsingAlias(ResourceTableMap::COL_RESOURCE_ID, $resourceFile->getResourceId(), $comparison);
     } elseif ($resourceFile instanceof ObjectCollection) {
         return $this->useResourceFileQuery()->filterByPrimaryKeys($resourceFile->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByResourceFile() only accepts arguments of type \\App\\Propel\\ResourceFile or Collection');
     }
 }
コード例 #2
0
ファイル: File.php プロジェクト: mtornero/slowshop
 /**
  * @param ChildResourceFile $resourceFile The ChildResourceFile object to add.
  */
 protected function doAddResourceFile(ChildResourceFile $resourceFile)
 {
     $this->collResourceFiles[] = $resourceFile;
     $resourceFile->setFile($this);
 }
コード例 #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildResourceFile $resourceFile Object to remove from the list of results
  *
  * @return $this|ChildResourceFileQuery The current query, for fluid interface
  */
 public function prune($resourceFile = null)
 {
     if ($resourceFile) {
         $this->addUsingAlias(ResourceFileTableMap::COL_RESOURCE_FILE_ID, $resourceFile->getResourceFileId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }