コード例 #1
0
 protected function getMediaModelInstance($t2_object_id)
 {
     $obj = new FolderDocument();
     return $obj->setFolderId($t2_object_id);
 }
コード例 #2
0
ファイル: FolderDocumentI18n.php プロジェクト: margery/thelia
 /**
  * Declares an association between this object and a ChildFolderDocument object.
  *
  * @param                  ChildFolderDocument $v
  * @return                 \Thelia\Model\FolderDocumentI18n The current object (for fluent API support)
  * @throws PropelException
  */
 public function setFolderDocument(ChildFolderDocument $v = null)
 {
     if ($v === null) {
         $this->setId(NULL);
     } else {
         $this->setId($v->getId());
     }
     $this->aFolderDocument = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildFolderDocument object, it will not be re-added.
     if ($v !== null) {
         $v->addFolderDocumentI18n($this);
     }
     return $this;
 }
コード例 #3
0
 /**
  * Filter the query by a related \Thelia\Model\FolderDocument object
  *
  * @param \Thelia\Model\FolderDocument|ObjectCollection $folderDocument The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildFolderDocumentI18nQuery The current query, for fluid interface
  */
 public function filterByFolderDocument($folderDocument, $comparison = null)
 {
     if ($folderDocument instanceof \Thelia\Model\FolderDocument) {
         return $this->addUsingAlias(FolderDocumentI18nTableMap::ID, $folderDocument->getId(), $comparison);
     } elseif ($folderDocument instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(FolderDocumentI18nTableMap::ID, $folderDocument->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByFolderDocument() only accepts arguments of type \\Thelia\\Model\\FolderDocument or Collection');
     }
 }
コード例 #4
0
ファイル: FolderQuery.php プロジェクト: margery/thelia
 /**
  * Filter the query by a related \Thelia\Model\FolderDocument object
  *
  * @param \Thelia\Model\FolderDocument|ObjectCollection $folderDocument  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildFolderQuery The current query, for fluid interface
  */
 public function filterByFolderDocument($folderDocument, $comparison = null)
 {
     if ($folderDocument instanceof \Thelia\Model\FolderDocument) {
         return $this->addUsingAlias(FolderTableMap::ID, $folderDocument->getFolderId(), $comparison);
     } elseif ($folderDocument instanceof ObjectCollection) {
         return $this->useFolderDocumentQuery()->filterByPrimaryKeys($folderDocument->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByFolderDocument() only accepts arguments of type \\Thelia\\Model\\FolderDocument or Collection');
     }
 }
コード例 #5
0
 /**
  * Exclude object from result
  *
  * @param   ChildFolderDocument $folderDocument Object to remove from the list of results
  *
  * @return ChildFolderDocumentQuery The current query, for fluid interface
  */
 public function prune($folderDocument = null)
 {
     if ($folderDocument) {
         $this->addUsingAlias(FolderDocumentTableMap::ID, $folderDocument->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }