Ejemplo n.º 1
0
 /**
  * @param RewritingUrl $rewritingUrl
  */
 public function __construct(RewritingUrl $rewritingUrl)
 {
     $this->id = $rewritingUrl->getId();
     $this->url = $rewritingUrl->getUrl();
     $this->view = $rewritingUrl->getView();
     $this->viewLocale = $rewritingUrl->getViewLocale();
     $this->redirected = $rewritingUrl->getRedirected();
     $this->rewritingUrl = $rewritingUrl;
 }
Ejemplo n.º 2
0
 /**
  * Filter the query by a related \Thelia\Model\RewritingUrl object
  *
  * @param \Thelia\Model\RewritingUrl|ObjectCollection $rewritingUrl  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildRewritingUrlQuery The current query, for fluid interface
  */
 public function filterByRewritingUrlRelatedById($rewritingUrl, $comparison = null)
 {
     if ($rewritingUrl instanceof \Thelia\Model\RewritingUrl) {
         return $this->addUsingAlias(RewritingUrlTableMap::ID, $rewritingUrl->getRedirected(), $comparison);
     } elseif ($rewritingUrl instanceof ObjectCollection) {
         return $this->useRewritingUrlRelatedByIdQuery()->filterByPrimaryKeys($rewritingUrl->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByRewritingUrlRelatedById() only accepts arguments of type \\Thelia\\Model\\RewritingUrl or Collection');
     }
 }