update model
This commit is contained in:
@@ -91,6 +91,24 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
*/
|
||||
protected $product_sale_elements_id;
|
||||
|
||||
/**
|
||||
* The value for the price field.
|
||||
* @var double
|
||||
*/
|
||||
protected $price;
|
||||
|
||||
/**
|
||||
* The value for the promo_price field.
|
||||
* @var double
|
||||
*/
|
||||
protected $promo_price;
|
||||
|
||||
/**
|
||||
* The value for the price_end of life field.
|
||||
* @var string
|
||||
*/
|
||||
protected $price_end of life;
|
||||
|
||||
/**
|
||||
* The value for the created_at field.
|
||||
* @var string
|
||||
@@ -448,6 +466,48 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
return $this->product_sale_elements_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [price] column value.
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
public function getPrice()
|
||||
{
|
||||
|
||||
return $this->price;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [promo_price] column value.
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
public function getPromoPrice()
|
||||
{
|
||||
|
||||
return $this->promo_price;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [price_end of life] column value.
|
||||
*
|
||||
*
|
||||
* @param string $format The date/time format string (either date()-style or strftime()-style).
|
||||
* If format is NULL, then the raw \DateTime object will be returned.
|
||||
*
|
||||
* @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
|
||||
*
|
||||
* @throws PropelException - if unable to parse/validate the date/time value.
|
||||
*/
|
||||
public function getPriceEnd of life($format = NULL)
|
||||
{
|
||||
if ($format === null) {
|
||||
return $this->price_end of life;
|
||||
} else {
|
||||
return $this->price_end of life !== null ? $this->price_end of life->format($format) : null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [created_at] column value.
|
||||
*
|
||||
@@ -605,6 +665,69 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setProductSaleElementsId()
|
||||
|
||||
/**
|
||||
* Set the value of [price] column.
|
||||
*
|
||||
* @param double $v new value
|
||||
* @return \Thelia\Model\CartItem The current object (for fluent API support)
|
||||
*/
|
||||
public function setPrice($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (double) $v;
|
||||
}
|
||||
|
||||
if ($this->price !== $v) {
|
||||
$this->price = $v;
|
||||
$this->modifiedColumns[] = CartItemTableMap::PRICE;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setPrice()
|
||||
|
||||
/**
|
||||
* Set the value of [promo_price] column.
|
||||
*
|
||||
* @param double $v new value
|
||||
* @return \Thelia\Model\CartItem The current object (for fluent API support)
|
||||
*/
|
||||
public function setPromoPrice($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (double) $v;
|
||||
}
|
||||
|
||||
if ($this->promo_price !== $v) {
|
||||
$this->promo_price = $v;
|
||||
$this->modifiedColumns[] = CartItemTableMap::PROMO_PRICE;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setPromoPrice()
|
||||
|
||||
/**
|
||||
* Sets the value of [price_end of life] column to a normalized version of the date/time value specified.
|
||||
*
|
||||
* @param mixed $v string, integer (timestamp), or \DateTime value.
|
||||
* Empty strings are treated as NULL.
|
||||
* @return \Thelia\Model\CartItem The current object (for fluent API support)
|
||||
*/
|
||||
public function setPriceEnd of life($v)
|
||||
{
|
||||
$dt = PropelDateTime::newInstance($v, null, '\DateTime');
|
||||
if ($this->price_end of life !== null || $dt !== null) {
|
||||
if ($dt !== $this->price_end of life) {
|
||||
$this->price_end of life = $dt;
|
||||
$this->modifiedColumns[] = CartItemTableMap::PRICE_END OF LIFE;
|
||||
}
|
||||
} // if either are not null
|
||||
|
||||
|
||||
return $this;
|
||||
} // setPriceEnd of life()
|
||||
|
||||
/**
|
||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||
*
|
||||
@@ -703,13 +826,25 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CartItemTableMap::translateFieldName('ProductSaleElementsId', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->product_sale_elements_id = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CartItemTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CartItemTableMap::translateFieldName('Price', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->price = (null !== $col) ? (double) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CartItemTableMap::translateFieldName('PromoPrice', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->promo_price = (null !== $col) ? (double) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CartItemTableMap::translateFieldName('PriceEnd of life', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->price_end of life = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CartItemTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CartItemTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CartItemTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
@@ -722,7 +857,7 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 7; // 7 = CartItemTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 10; // 10 = CartItemTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\CartItem object", 0, $e);
|
||||
@@ -995,6 +1130,15 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CartItemTableMap::PRODUCT_SALE_ELEMENTS_ID)) {
|
||||
$modifiedColumns[':p' . $index++] = 'PRODUCT_SALE_ELEMENTS_ID';
|
||||
}
|
||||
if ($this->isColumnModified(CartItemTableMap::PRICE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'PRICE';
|
||||
}
|
||||
if ($this->isColumnModified(CartItemTableMap::PROMO_PRICE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'PROMO_PRICE';
|
||||
}
|
||||
if ($this->isColumnModified(CartItemTableMap::PRICE_END OF LIFE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'PRICE_END OF LIFE';
|
||||
}
|
||||
if ($this->isColumnModified(CartItemTableMap::CREATED_AT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
|
||||
}
|
||||
@@ -1027,6 +1171,15 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
case 'PRODUCT_SALE_ELEMENTS_ID':
|
||||
$stmt->bindValue($identifier, $this->product_sale_elements_id, PDO::PARAM_INT);
|
||||
break;
|
||||
case 'PRICE':
|
||||
$stmt->bindValue($identifier, $this->price, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'PROMO_PRICE':
|
||||
$stmt->bindValue($identifier, $this->promo_price, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'PRICE_END OF LIFE':
|
||||
$stmt->bindValue($identifier, $this->price_end of life ? $this->price_end of life->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'CREATED_AT':
|
||||
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
||||
break;
|
||||
@@ -1111,9 +1264,18 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
return $this->getProductSaleElementsId();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getCreatedAt();
|
||||
return $this->getPrice();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getPromoPrice();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getPriceEnd of life();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 9:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
default:
|
||||
@@ -1150,8 +1312,11 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
$keys[2] => $this->getProductId(),
|
||||
$keys[3] => $this->getQuantity(),
|
||||
$keys[4] => $this->getProductSaleElementsId(),
|
||||
$keys[5] => $this->getCreatedAt(),
|
||||
$keys[6] => $this->getUpdatedAt(),
|
||||
$keys[5] => $this->getPrice(),
|
||||
$keys[6] => $this->getPromoPrice(),
|
||||
$keys[7] => $this->getPriceEnd of life(),
|
||||
$keys[8] => $this->getCreatedAt(),
|
||||
$keys[9] => $this->getUpdatedAt(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1219,9 +1384,18 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
$this->setProductSaleElementsId($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setCreatedAt($value);
|
||||
$this->setPrice($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setPromoPrice($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setPriceEnd of life($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 9:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1253,8 +1427,11 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
if (array_key_exists($keys[2], $arr)) $this->setProductId($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setQuantity($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setProductSaleElementsId($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setPrice($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setPromoPrice($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setPriceEnd of life($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setCreatedAt($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setUpdatedAt($arr[$keys[9]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1271,6 +1448,9 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CartItemTableMap::PRODUCT_ID)) $criteria->add(CartItemTableMap::PRODUCT_ID, $this->product_id);
|
||||
if ($this->isColumnModified(CartItemTableMap::QUANTITY)) $criteria->add(CartItemTableMap::QUANTITY, $this->quantity);
|
||||
if ($this->isColumnModified(CartItemTableMap::PRODUCT_SALE_ELEMENTS_ID)) $criteria->add(CartItemTableMap::PRODUCT_SALE_ELEMENTS_ID, $this->product_sale_elements_id);
|
||||
if ($this->isColumnModified(CartItemTableMap::PRICE)) $criteria->add(CartItemTableMap::PRICE, $this->price);
|
||||
if ($this->isColumnModified(CartItemTableMap::PROMO_PRICE)) $criteria->add(CartItemTableMap::PROMO_PRICE, $this->promo_price);
|
||||
if ($this->isColumnModified(CartItemTableMap::PRICE_END OF LIFE)) $criteria->add(CartItemTableMap::PRICE_END OF LIFE, $this->price_end of life);
|
||||
if ($this->isColumnModified(CartItemTableMap::CREATED_AT)) $criteria->add(CartItemTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(CartItemTableMap::UPDATED_AT)) $criteria->add(CartItemTableMap::UPDATED_AT, $this->updated_at);
|
||||
|
||||
@@ -1340,6 +1520,9 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
$copyObj->setProductId($this->getProductId());
|
||||
$copyObj->setQuantity($this->getQuantity());
|
||||
$copyObj->setProductSaleElementsId($this->getProductSaleElementsId());
|
||||
$copyObj->setPrice($this->getPrice());
|
||||
$copyObj->setPromoPrice($this->getPromoPrice());
|
||||
$copyObj->setPriceEnd of life($this->getPriceEnd of life());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
if ($makeNew) {
|
||||
@@ -1533,6 +1716,9 @@ abstract class CartItem implements ActiveRecordInterface
|
||||
$this->product_id = null;
|
||||
$this->quantity = null;
|
||||
$this->product_sale_elements_id = null;
|
||||
$this->price = null;
|
||||
$this->promo_price = null;
|
||||
$this->price_end of life = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
$this->alreadyInSave = false;
|
||||
|
||||
@@ -26,6 +26,9 @@ use Thelia\Model\Map\CartItemTableMap;
|
||||
* @method ChildCartItemQuery orderByProductId($order = Criteria::ASC) Order by the product_id column
|
||||
* @method ChildCartItemQuery orderByQuantity($order = Criteria::ASC) Order by the quantity column
|
||||
* @method ChildCartItemQuery orderByProductSaleElementsId($order = Criteria::ASC) Order by the product_sale_elements_id column
|
||||
* @method ChildCartItemQuery orderByPrice($order = Criteria::ASC) Order by the price column
|
||||
* @method ChildCartItemQuery orderByPromoPrice($order = Criteria::ASC) Order by the promo_price column
|
||||
* @method ChildCartItemQuery orderByPriceEnd of life($order = Criteria::ASC) Order by the price_end of life column
|
||||
* @method ChildCartItemQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildCartItemQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
@@ -34,6 +37,9 @@ use Thelia\Model\Map\CartItemTableMap;
|
||||
* @method ChildCartItemQuery groupByProductId() Group by the product_id column
|
||||
* @method ChildCartItemQuery groupByQuantity() Group by the quantity column
|
||||
* @method ChildCartItemQuery groupByProductSaleElementsId() Group by the product_sale_elements_id column
|
||||
* @method ChildCartItemQuery groupByPrice() Group by the price column
|
||||
* @method ChildCartItemQuery groupByPromoPrice() Group by the promo_price column
|
||||
* @method ChildCartItemQuery groupByPriceEnd of life() Group by the price_end of life column
|
||||
* @method ChildCartItemQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildCartItemQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
@@ -61,6 +67,9 @@ use Thelia\Model\Map\CartItemTableMap;
|
||||
* @method ChildCartItem findOneByProductId(int $product_id) Return the first ChildCartItem filtered by the product_id column
|
||||
* @method ChildCartItem findOneByQuantity(double $quantity) Return the first ChildCartItem filtered by the quantity column
|
||||
* @method ChildCartItem findOneByProductSaleElementsId(int $product_sale_elements_id) Return the first ChildCartItem filtered by the product_sale_elements_id column
|
||||
* @method ChildCartItem findOneByPrice(double $price) Return the first ChildCartItem filtered by the price column
|
||||
* @method ChildCartItem findOneByPromoPrice(double $promo_price) Return the first ChildCartItem filtered by the promo_price column
|
||||
* @method ChildCartItem findOneByPriceEnd of life(string $price_end of life) Return the first ChildCartItem filtered by the price_end of life column
|
||||
* @method ChildCartItem findOneByCreatedAt(string $created_at) Return the first ChildCartItem filtered by the created_at column
|
||||
* @method ChildCartItem findOneByUpdatedAt(string $updated_at) Return the first ChildCartItem filtered by the updated_at column
|
||||
*
|
||||
@@ -69,6 +78,9 @@ use Thelia\Model\Map\CartItemTableMap;
|
||||
* @method array findByProductId(int $product_id) Return ChildCartItem objects filtered by the product_id column
|
||||
* @method array findByQuantity(double $quantity) Return ChildCartItem objects filtered by the quantity column
|
||||
* @method array findByProductSaleElementsId(int $product_sale_elements_id) Return ChildCartItem objects filtered by the product_sale_elements_id column
|
||||
* @method array findByPrice(double $price) Return ChildCartItem objects filtered by the price column
|
||||
* @method array findByPromoPrice(double $promo_price) Return ChildCartItem objects filtered by the promo_price column
|
||||
* @method array findByPriceEnd of life(string $price_end of life) Return ChildCartItem objects filtered by the price_end of life column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildCartItem objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildCartItem objects filtered by the updated_at column
|
||||
*
|
||||
@@ -159,7 +171,7 @@ abstract class CartItemQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, CART_ID, PRODUCT_ID, QUANTITY, PRODUCT_SALE_ELEMENTS_ID, CREATED_AT, UPDATED_AT FROM cart_item WHERE ID = :p0';
|
||||
$sql = 'SELECT ID, CART_ID, PRODUCT_ID, QUANTITY, PRODUCT_SALE_ELEMENTS_ID, PRICE, PROMO_PRICE, PRICE_END OF LIFE, CREATED_AT, UPDATED_AT FROM cart_item WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -459,6 +471,131 @@ abstract class CartItemQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CartItemTableMap::PRODUCT_SALE_ELEMENTS_ID, $productSaleElementsId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the price column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByPrice(1234); // WHERE price = 1234
|
||||
* $query->filterByPrice(array(12, 34)); // WHERE price IN (12, 34)
|
||||
* $query->filterByPrice(array('min' => 12)); // WHERE price > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $price The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCartItemQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrice($price = null, $comparison = null)
|
||||
{
|
||||
if (is_array($price)) {
|
||||
$useMinMax = false;
|
||||
if (isset($price['min'])) {
|
||||
$this->addUsingAlias(CartItemTableMap::PRICE, $price['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($price['max'])) {
|
||||
$this->addUsingAlias(CartItemTableMap::PRICE, $price['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CartItemTableMap::PRICE, $price, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the promo_price column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByPromoPrice(1234); // WHERE promo_price = 1234
|
||||
* $query->filterByPromoPrice(array(12, 34)); // WHERE promo_price IN (12, 34)
|
||||
* $query->filterByPromoPrice(array('min' => 12)); // WHERE promo_price > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $promoPrice The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCartItemQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPromoPrice($promoPrice = null, $comparison = null)
|
||||
{
|
||||
if (is_array($promoPrice)) {
|
||||
$useMinMax = false;
|
||||
if (isset($promoPrice['min'])) {
|
||||
$this->addUsingAlias(CartItemTableMap::PROMO_PRICE, $promoPrice['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($promoPrice['max'])) {
|
||||
$this->addUsingAlias(CartItemTableMap::PROMO_PRICE, $promoPrice['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CartItemTableMap::PROMO_PRICE, $promoPrice, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the price_end of life column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByPriceEnd of life('2011-03-14'); // WHERE price_end of life = '2011-03-14'
|
||||
* $query->filterByPriceEnd of life('now'); // WHERE price_end of life = '2011-03-14'
|
||||
* $query->filterByPriceEnd of life(array('max' => 'yesterday')); // WHERE price_end of life > '2011-03-13'
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $priceEnd of life The value to use as filter.
|
||||
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||
* Empty strings are treated as NULL.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCartItemQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPriceEnd of life($priceEnd of life = null, $comparison = null)
|
||||
{
|
||||
if (is_array($priceEnd of life)) {
|
||||
$useMinMax = false;
|
||||
if (isset($priceEnd of life['min'])) {
|
||||
$this->addUsingAlias(CartItemTableMap::PRICE_END OF LIFE, $priceEnd of life['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($priceEnd of life['max'])) {
|
||||
$this->addUsingAlias(CartItemTableMap::PRICE_END OF LIFE, $priceEnd of life['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CartItemTableMap::PRICE_END OF LIFE, $priceEnd of life, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
|
||||
@@ -82,12 +82,6 @@ abstract class Folder implements ActiveRecordInterface
|
||||
*/
|
||||
protected $parent;
|
||||
|
||||
/**
|
||||
* The value for the link field.
|
||||
* @var string
|
||||
*/
|
||||
protected $link;
|
||||
|
||||
/**
|
||||
* The value for the visible field.
|
||||
* @var int
|
||||
@@ -533,17 +527,6 @@ abstract class Folder implements ActiveRecordInterface
|
||||
return $this->parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [link] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLink()
|
||||
{
|
||||
|
||||
return $this->link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [visible] column value.
|
||||
*
|
||||
@@ -690,27 +673,6 @@ abstract class Folder implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setParent()
|
||||
|
||||
/**
|
||||
* Set the value of [link] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Folder The current object (for fluent API support)
|
||||
*/
|
||||
public function setLink($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->link !== $v) {
|
||||
$this->link = $v;
|
||||
$this->modifiedColumns[] = FolderTableMap::LINK;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setLink()
|
||||
|
||||
/**
|
||||
* Set the value of [visible] column.
|
||||
*
|
||||
@@ -905,37 +867,34 @@ abstract class Folder implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : FolderTableMap::translateFieldName('Parent', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->parent = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : FolderTableMap::translateFieldName('Link', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->link = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : FolderTableMap::translateFieldName('Visible', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : FolderTableMap::translateFieldName('Visible', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->visible = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : FolderTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : FolderTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->position = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : FolderTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : FolderTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : FolderTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : FolderTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : FolderTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : FolderTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : FolderTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : FolderTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : FolderTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : FolderTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version_created_by = (null !== $col) ? (string) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
@@ -945,7 +904,7 @@ abstract class Folder implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 10; // 10 = FolderTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 9; // 9 = FolderTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\Folder object", 0, $e);
|
||||
@@ -1325,9 +1284,6 @@ abstract class Folder implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(FolderTableMap::PARENT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'PARENT';
|
||||
}
|
||||
if ($this->isColumnModified(FolderTableMap::LINK)) {
|
||||
$modifiedColumns[':p' . $index++] = 'LINK';
|
||||
}
|
||||
if ($this->isColumnModified(FolderTableMap::VISIBLE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'VISIBLE';
|
||||
}
|
||||
@@ -1366,9 +1322,6 @@ abstract class Folder implements ActiveRecordInterface
|
||||
case 'PARENT':
|
||||
$stmt->bindValue($identifier, $this->parent, PDO::PARAM_INT);
|
||||
break;
|
||||
case 'LINK':
|
||||
$stmt->bindValue($identifier, $this->link, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'VISIBLE':
|
||||
$stmt->bindValue($identifier, $this->visible, PDO::PARAM_INT);
|
||||
break;
|
||||
@@ -1459,27 +1412,24 @@ abstract class Folder implements ActiveRecordInterface
|
||||
return $this->getParent();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getLink();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getVisible();
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
return $this->getPosition();
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
return $this->getVersion();
|
||||
break;
|
||||
case 8:
|
||||
case 7:
|
||||
return $this->getVersionCreatedAt();
|
||||
break;
|
||||
case 9:
|
||||
case 8:
|
||||
return $this->getVersionCreatedBy();
|
||||
break;
|
||||
default:
|
||||
@@ -1513,14 +1463,13 @@ abstract class Folder implements ActiveRecordInterface
|
||||
$result = array(
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getParent(),
|
||||
$keys[2] => $this->getLink(),
|
||||
$keys[3] => $this->getVisible(),
|
||||
$keys[4] => $this->getPosition(),
|
||||
$keys[5] => $this->getCreatedAt(),
|
||||
$keys[6] => $this->getUpdatedAt(),
|
||||
$keys[7] => $this->getVersion(),
|
||||
$keys[8] => $this->getVersionCreatedAt(),
|
||||
$keys[9] => $this->getVersionCreatedBy(),
|
||||
$keys[2] => $this->getVisible(),
|
||||
$keys[3] => $this->getPosition(),
|
||||
$keys[4] => $this->getCreatedAt(),
|
||||
$keys[5] => $this->getUpdatedAt(),
|
||||
$keys[6] => $this->getVersion(),
|
||||
$keys[7] => $this->getVersionCreatedAt(),
|
||||
$keys[8] => $this->getVersionCreatedBy(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1588,27 +1537,24 @@ abstract class Folder implements ActiveRecordInterface
|
||||
$this->setParent($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setLink($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setVisible($value);
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
$this->setPosition($value);
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
$this->setVersion($value);
|
||||
break;
|
||||
case 8:
|
||||
case 7:
|
||||
$this->setVersionCreatedAt($value);
|
||||
break;
|
||||
case 9:
|
||||
case 8:
|
||||
$this->setVersionCreatedBy($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1637,14 +1583,13 @@ abstract class Folder implements ActiveRecordInterface
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setParent($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setLink($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setVisible($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setPosition($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setVersion($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setVersionCreatedAt($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setVersionCreatedBy($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setVisible($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setPosition($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setVersion($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setVersionCreatedAt($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setVersionCreatedBy($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1658,7 +1603,6 @@ abstract class Folder implements ActiveRecordInterface
|
||||
|
||||
if ($this->isColumnModified(FolderTableMap::ID)) $criteria->add(FolderTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(FolderTableMap::PARENT)) $criteria->add(FolderTableMap::PARENT, $this->parent);
|
||||
if ($this->isColumnModified(FolderTableMap::LINK)) $criteria->add(FolderTableMap::LINK, $this->link);
|
||||
if ($this->isColumnModified(FolderTableMap::VISIBLE)) $criteria->add(FolderTableMap::VISIBLE, $this->visible);
|
||||
if ($this->isColumnModified(FolderTableMap::POSITION)) $criteria->add(FolderTableMap::POSITION, $this->position);
|
||||
if ($this->isColumnModified(FolderTableMap::CREATED_AT)) $criteria->add(FolderTableMap::CREATED_AT, $this->created_at);
|
||||
@@ -1730,7 +1674,6 @@ abstract class Folder implements ActiveRecordInterface
|
||||
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
|
||||
{
|
||||
$copyObj->setParent($this->getParent());
|
||||
$copyObj->setLink($this->getLink());
|
||||
$copyObj->setVisible($this->getVisible());
|
||||
$copyObj->setPosition($this->getPosition());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
@@ -3602,7 +3545,6 @@ abstract class Folder implements ActiveRecordInterface
|
||||
{
|
||||
$this->id = null;
|
||||
$this->parent = null;
|
||||
$this->link = null;
|
||||
$this->visible = null;
|
||||
$this->position = null;
|
||||
$this->created_at = null;
|
||||
@@ -3970,7 +3912,6 @@ abstract class Folder implements ActiveRecordInterface
|
||||
$version = new ChildFolderVersion();
|
||||
$version->setId($this->getId());
|
||||
$version->setParent($this->getParent());
|
||||
$version->setLink($this->getLink());
|
||||
$version->setVisible($this->getVisible());
|
||||
$version->setPosition($this->getPosition());
|
||||
$version->setCreatedAt($this->getCreatedAt());
|
||||
@@ -4017,7 +3958,6 @@ abstract class Folder implements ActiveRecordInterface
|
||||
$loadedObjects['ChildFolder'][$version->getId()][$version->getVersion()] = $this;
|
||||
$this->setId($version->getId());
|
||||
$this->setParent($version->getParent());
|
||||
$this->setLink($version->getLink());
|
||||
$this->setVisible($version->getVisible());
|
||||
$this->setPosition($version->getPosition());
|
||||
$this->setCreatedAt($version->getCreatedAt());
|
||||
|
||||
@@ -24,7 +24,6 @@ use Thelia\Model\Map\FolderTableMap;
|
||||
*
|
||||
* @method ChildFolderQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildFolderQuery orderByParent($order = Criteria::ASC) Order by the parent column
|
||||
* @method ChildFolderQuery orderByLink($order = Criteria::ASC) Order by the link column
|
||||
* @method ChildFolderQuery orderByVisible($order = Criteria::ASC) Order by the visible column
|
||||
* @method ChildFolderQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildFolderQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
@@ -35,7 +34,6 @@ use Thelia\Model\Map\FolderTableMap;
|
||||
*
|
||||
* @method ChildFolderQuery groupById() Group by the id column
|
||||
* @method ChildFolderQuery groupByParent() Group by the parent column
|
||||
* @method ChildFolderQuery groupByLink() Group by the link column
|
||||
* @method ChildFolderQuery groupByVisible() Group by the visible column
|
||||
* @method ChildFolderQuery groupByPosition() Group by the position column
|
||||
* @method ChildFolderQuery groupByCreatedAt() Group by the created_at column
|
||||
@@ -77,7 +75,6 @@ use Thelia\Model\Map\FolderTableMap;
|
||||
*
|
||||
* @method ChildFolder findOneById(int $id) Return the first ChildFolder filtered by the id column
|
||||
* @method ChildFolder findOneByParent(int $parent) Return the first ChildFolder filtered by the parent column
|
||||
* @method ChildFolder findOneByLink(string $link) Return the first ChildFolder filtered by the link column
|
||||
* @method ChildFolder findOneByVisible(int $visible) Return the first ChildFolder filtered by the visible column
|
||||
* @method ChildFolder findOneByPosition(int $position) Return the first ChildFolder filtered by the position column
|
||||
* @method ChildFolder findOneByCreatedAt(string $created_at) Return the first ChildFolder filtered by the created_at column
|
||||
@@ -88,7 +85,6 @@ use Thelia\Model\Map\FolderTableMap;
|
||||
*
|
||||
* @method array findById(int $id) Return ChildFolder objects filtered by the id column
|
||||
* @method array findByParent(int $parent) Return ChildFolder objects filtered by the parent column
|
||||
* @method array findByLink(string $link) Return ChildFolder objects filtered by the link column
|
||||
* @method array findByVisible(int $visible) Return ChildFolder objects filtered by the visible column
|
||||
* @method array findByPosition(int $position) Return ChildFolder objects filtered by the position column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildFolder objects filtered by the created_at column
|
||||
@@ -191,7 +187,7 @@ abstract class FolderQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, PARENT, LINK, VISIBLE, POSITION, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM folder WHERE ID = :p0';
|
||||
$sql = 'SELECT ID, PARENT, VISIBLE, POSITION, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM folder WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -362,35 +358,6 @@ abstract class FolderQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(FolderTableMap::PARENT, $parent, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the link column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByLink('fooValue'); // WHERE link = 'fooValue'
|
||||
* $query->filterByLink('%fooValue%'); // WHERE link LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $link The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildFolderQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByLink($link = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($link)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $link)) {
|
||||
$link = str_replace('*', '%', $link);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(FolderTableMap::LINK, $link, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the visible column
|
||||
*
|
||||
|
||||
@@ -67,12 +67,6 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
*/
|
||||
protected $parent;
|
||||
|
||||
/**
|
||||
* The value for the link field.
|
||||
* @var string
|
||||
*/
|
||||
protected $link;
|
||||
|
||||
/**
|
||||
* The value for the visible field.
|
||||
* @var int
|
||||
@@ -418,17 +412,6 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
return $this->parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [link] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLink()
|
||||
{
|
||||
|
||||
return $this->link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [visible] column value.
|
||||
*
|
||||
@@ -579,27 +562,6 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setParent()
|
||||
|
||||
/**
|
||||
* Set the value of [link] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\FolderVersion The current object (for fluent API support)
|
||||
*/
|
||||
public function setLink($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->link !== $v) {
|
||||
$this->link = $v;
|
||||
$this->modifiedColumns[] = FolderVersionTableMap::LINK;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setLink()
|
||||
|
||||
/**
|
||||
* Set the value of [visible] column.
|
||||
*
|
||||
@@ -794,37 +756,34 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : FolderVersionTableMap::translateFieldName('Parent', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->parent = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : FolderVersionTableMap::translateFieldName('Link', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->link = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : FolderVersionTableMap::translateFieldName('Visible', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : FolderVersionTableMap::translateFieldName('Visible', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->visible = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : FolderVersionTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : FolderVersionTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->position = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : FolderVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : FolderVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : FolderVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : FolderVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : FolderVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : FolderVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : FolderVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : FolderVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : FolderVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : FolderVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version_created_by = (null !== $col) ? (string) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
@@ -834,7 +793,7 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 10; // 10 = FolderVersionTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 9; // 9 = FolderVersionTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\FolderVersion object", 0, $e);
|
||||
@@ -1061,9 +1020,6 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(FolderVersionTableMap::PARENT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'PARENT';
|
||||
}
|
||||
if ($this->isColumnModified(FolderVersionTableMap::LINK)) {
|
||||
$modifiedColumns[':p' . $index++] = 'LINK';
|
||||
}
|
||||
if ($this->isColumnModified(FolderVersionTableMap::VISIBLE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'VISIBLE';
|
||||
}
|
||||
@@ -1102,9 +1058,6 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
case 'PARENT':
|
||||
$stmt->bindValue($identifier, $this->parent, PDO::PARAM_INT);
|
||||
break;
|
||||
case 'LINK':
|
||||
$stmt->bindValue($identifier, $this->link, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'VISIBLE':
|
||||
$stmt->bindValue($identifier, $this->visible, PDO::PARAM_INT);
|
||||
break;
|
||||
@@ -1188,27 +1141,24 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
return $this->getParent();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getLink();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getVisible();
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
return $this->getPosition();
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
return $this->getVersion();
|
||||
break;
|
||||
case 8:
|
||||
case 7:
|
||||
return $this->getVersionCreatedAt();
|
||||
break;
|
||||
case 9:
|
||||
case 8:
|
||||
return $this->getVersionCreatedBy();
|
||||
break;
|
||||
default:
|
||||
@@ -1242,14 +1192,13 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
$result = array(
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getParent(),
|
||||
$keys[2] => $this->getLink(),
|
||||
$keys[3] => $this->getVisible(),
|
||||
$keys[4] => $this->getPosition(),
|
||||
$keys[5] => $this->getCreatedAt(),
|
||||
$keys[6] => $this->getUpdatedAt(),
|
||||
$keys[7] => $this->getVersion(),
|
||||
$keys[8] => $this->getVersionCreatedAt(),
|
||||
$keys[9] => $this->getVersionCreatedBy(),
|
||||
$keys[2] => $this->getVisible(),
|
||||
$keys[3] => $this->getPosition(),
|
||||
$keys[4] => $this->getCreatedAt(),
|
||||
$keys[5] => $this->getUpdatedAt(),
|
||||
$keys[6] => $this->getVersion(),
|
||||
$keys[7] => $this->getVersionCreatedAt(),
|
||||
$keys[8] => $this->getVersionCreatedBy(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1302,27 +1251,24 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
$this->setParent($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setLink($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setVisible($value);
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
$this->setPosition($value);
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
$this->setVersion($value);
|
||||
break;
|
||||
case 8:
|
||||
case 7:
|
||||
$this->setVersionCreatedAt($value);
|
||||
break;
|
||||
case 9:
|
||||
case 8:
|
||||
$this->setVersionCreatedBy($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1351,14 +1297,13 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setParent($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setLink($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setVisible($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setPosition($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setVersion($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setVersionCreatedAt($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setVersionCreatedBy($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setVisible($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setPosition($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setVersion($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setVersionCreatedAt($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setVersionCreatedBy($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1372,7 +1317,6 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
|
||||
if ($this->isColumnModified(FolderVersionTableMap::ID)) $criteria->add(FolderVersionTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(FolderVersionTableMap::PARENT)) $criteria->add(FolderVersionTableMap::PARENT, $this->parent);
|
||||
if ($this->isColumnModified(FolderVersionTableMap::LINK)) $criteria->add(FolderVersionTableMap::LINK, $this->link);
|
||||
if ($this->isColumnModified(FolderVersionTableMap::VISIBLE)) $criteria->add(FolderVersionTableMap::VISIBLE, $this->visible);
|
||||
if ($this->isColumnModified(FolderVersionTableMap::POSITION)) $criteria->add(FolderVersionTableMap::POSITION, $this->position);
|
||||
if ($this->isColumnModified(FolderVersionTableMap::CREATED_AT)) $criteria->add(FolderVersionTableMap::CREATED_AT, $this->created_at);
|
||||
@@ -1452,7 +1396,6 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
{
|
||||
$copyObj->setId($this->getId());
|
||||
$copyObj->setParent($this->getParent());
|
||||
$copyObj->setLink($this->getLink());
|
||||
$copyObj->setVisible($this->getVisible());
|
||||
$copyObj->setPosition($this->getPosition());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
@@ -1545,7 +1488,6 @@ abstract class FolderVersion implements ActiveRecordInterface
|
||||
{
|
||||
$this->id = null;
|
||||
$this->parent = null;
|
||||
$this->link = null;
|
||||
$this->visible = null;
|
||||
$this->position = null;
|
||||
$this->created_at = null;
|
||||
|
||||
@@ -23,7 +23,6 @@ use Thelia\Model\Map\FolderVersionTableMap;
|
||||
*
|
||||
* @method ChildFolderVersionQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildFolderVersionQuery orderByParent($order = Criteria::ASC) Order by the parent column
|
||||
* @method ChildFolderVersionQuery orderByLink($order = Criteria::ASC) Order by the link column
|
||||
* @method ChildFolderVersionQuery orderByVisible($order = Criteria::ASC) Order by the visible column
|
||||
* @method ChildFolderVersionQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildFolderVersionQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
@@ -34,7 +33,6 @@ use Thelia\Model\Map\FolderVersionTableMap;
|
||||
*
|
||||
* @method ChildFolderVersionQuery groupById() Group by the id column
|
||||
* @method ChildFolderVersionQuery groupByParent() Group by the parent column
|
||||
* @method ChildFolderVersionQuery groupByLink() Group by the link column
|
||||
* @method ChildFolderVersionQuery groupByVisible() Group by the visible column
|
||||
* @method ChildFolderVersionQuery groupByPosition() Group by the position column
|
||||
* @method ChildFolderVersionQuery groupByCreatedAt() Group by the created_at column
|
||||
@@ -56,7 +54,6 @@ use Thelia\Model\Map\FolderVersionTableMap;
|
||||
*
|
||||
* @method ChildFolderVersion findOneById(int $id) Return the first ChildFolderVersion filtered by the id column
|
||||
* @method ChildFolderVersion findOneByParent(int $parent) Return the first ChildFolderVersion filtered by the parent column
|
||||
* @method ChildFolderVersion findOneByLink(string $link) Return the first ChildFolderVersion filtered by the link column
|
||||
* @method ChildFolderVersion findOneByVisible(int $visible) Return the first ChildFolderVersion filtered by the visible column
|
||||
* @method ChildFolderVersion findOneByPosition(int $position) Return the first ChildFolderVersion filtered by the position column
|
||||
* @method ChildFolderVersion findOneByCreatedAt(string $created_at) Return the first ChildFolderVersion filtered by the created_at column
|
||||
@@ -67,7 +64,6 @@ use Thelia\Model\Map\FolderVersionTableMap;
|
||||
*
|
||||
* @method array findById(int $id) Return ChildFolderVersion objects filtered by the id column
|
||||
* @method array findByParent(int $parent) Return ChildFolderVersion objects filtered by the parent column
|
||||
* @method array findByLink(string $link) Return ChildFolderVersion objects filtered by the link column
|
||||
* @method array findByVisible(int $visible) Return ChildFolderVersion objects filtered by the visible column
|
||||
* @method array findByPosition(int $position) Return ChildFolderVersion objects filtered by the position column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildFolderVersion objects filtered by the created_at column
|
||||
@@ -163,7 +159,7 @@ abstract class FolderVersionQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, PARENT, LINK, VISIBLE, POSITION, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM folder_version WHERE ID = :p0 AND VERSION = :p1';
|
||||
$sql = 'SELECT ID, PARENT, VISIBLE, POSITION, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM folder_version WHERE ID = :p0 AND VERSION = :p1';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||
@@ -348,35 +344,6 @@ abstract class FolderVersionQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(FolderVersionTableMap::PARENT, $parent, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the link column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByLink('fooValue'); // WHERE link = 'fooValue'
|
||||
* $query->filterByLink('%fooValue%'); // WHERE link LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $link The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildFolderVersionQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByLink($link = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($link)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $link)) {
|
||||
$link = str_replace('*', '%', $link);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(FolderVersionTableMap::LINK, $link, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the visible column
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user