Ejemplo n.º 1
0
 /**
  * Declares an association between this object and a ChildOrderStatus object.
  *
  * @param                  ChildOrderStatus $v
  * @return                 \Thelia\Model\OrderStatusI18n The current object (for fluent API support)
  * @throws PropelException
  */
 public function setOrderStatus(ChildOrderStatus $v = null)
 {
     if ($v === null) {
         $this->setId(NULL);
     } else {
         $this->setId($v->getId());
     }
     $this->aOrderStatus = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildOrderStatus object, it will not be re-added.
     if ($v !== null) {
         $v->addOrderStatusI18n($this);
     }
     return $this;
 }
Ejemplo n.º 2
0
 /**
  * @param OrderStatusModel $orderStatus
  * @return OrderStatusUpdateEvent
  */
 public function getUpdateEvent(OrderStatusModel $orderStatus)
 {
     $event = new OrderStatusUpdateEvent($orderStatus->getId());
     $event->setLocale($orderStatus->getLocale())->setTitle($orderStatus->getTitle())->setChapo($orderStatus->getChapo())->setDescription($orderStatus->getDescription())->setPostscriptum($orderStatus->getPostscriptum())->setColor($orderStatus->getColor())->setCode($orderStatus->getCode());
     return $event;
 }
Ejemplo n.º 3
0
 /**
  * Exclude object from result
  *
  * @param   ChildOrderStatus $orderStatus Object to remove from the list of results
  *
  * @return ChildOrderStatusQuery The current query, for fluid interface
  */
 public function prune($orderStatus = null)
 {
     if ($orderStatus) {
         $this->addUsingAlias(OrderStatusTableMap::ID, $orderStatus->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Ejemplo n.º 4
0
 /**
  * Filter the query by a related \Thelia\Model\OrderStatus object
  *
  * @param \Thelia\Model\OrderStatus|ObjectCollection $orderStatus The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildOrderStatusI18nQuery The current query, for fluid interface
  */
 public function filterByOrderStatus($orderStatus, $comparison = null)
 {
     if ($orderStatus instanceof \Thelia\Model\OrderStatus) {
         return $this->addUsingAlias(OrderStatusI18nTableMap::ID, $orderStatus->getId(), $comparison);
     } elseif ($orderStatus instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(OrderStatusI18nTableMap::ID, $orderStatus->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByOrderStatus() only accepts arguments of type \\Thelia\\Model\\OrderStatus or Collection');
     }
 }
 /**
  * Returns the object ID from the object
  *
  * @param OrderStatus $object
  *
  * @return int order status id
  */
 protected function getObjectId($object)
 {
     return $object->getId();
 }