+ * $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
+ * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
+ *
+ *
+ * @param string $title 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 ChildCouponI18nQuery The current query, for fluid interface
+ */
+ public function filterByTitle($title = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($title)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $title)) {
+ $title = str_replace('*', '%', $title);
+ $comparison = Criteria::LIKE;
+ }
+ }
+
+ return $this->addUsingAlias(CouponI18nTableMap::TITLE, $title, $comparison);
+ }
+
+ /**
+ * Filter the query on the short_description column
+ *
+ * Example usage:
+ *
+ * $query->filterByShortDescription('fooValue'); // WHERE short_description = 'fooValue'
+ * $query->filterByShortDescription('%fooValue%'); // WHERE short_description LIKE '%fooValue%'
+ *
+ *
+ * @param string $shortDescription 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 ChildCouponI18nQuery The current query, for fluid interface
+ */
+ public function filterByShortDescription($shortDescription = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($shortDescription)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $shortDescription)) {
+ $shortDescription = str_replace('*', '%', $shortDescription);
+ $comparison = Criteria::LIKE;
+ }
+ }
+
+ return $this->addUsingAlias(CouponI18nTableMap::SHORT_DESCRIPTION, $shortDescription, $comparison);
+ }
+
+ /**
+ * Filter the query on the description column
+ *
+ * Example usage:
+ *
+ * $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
+ * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
+ *
+ *
+ * @param string $description 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 ChildCouponI18nQuery The current query, for fluid interface
+ */
+ public function filterByDescription($description = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($description)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $description)) {
+ $description = str_replace('*', '%', $description);
+ $comparison = Criteria::LIKE;
+ }
+ }
+
+ return $this->addUsingAlias(CouponI18nTableMap::DESCRIPTION, $description, $comparison);
+ }
+
/**
* Filter the query by a related \Thelia\Model\Coupon object
*
diff --git a/core/lib/Thelia/Model/Base/CouponOrder.php b/core/lib/Thelia/Model/Base/CouponOrder.php
old mode 100755
new mode 100644
index 7d3c413b6..b2685ea74
--- a/core/lib/Thelia/Model/Base/CouponOrder.php
+++ b/core/lib/Thelia/Model/Base/CouponOrder.php
@@ -16,10 +16,8 @@ use Propel\Runtime\Exception\PropelException;
use Propel\Runtime\Map\TableMap;
use Propel\Runtime\Parser\AbstractParser;
use Propel\Runtime\Util\PropelDateTime;
-use Thelia\Model\Coupon as ChildCoupon;
use Thelia\Model\CouponOrder as ChildCouponOrder;
use Thelia\Model\CouponOrderQuery as ChildCouponOrderQuery;
-use Thelia\Model\CouponQuery as ChildCouponQuery;
use Thelia\Model\Order as ChildOrder;
use Thelia\Model\OrderQuery as ChildOrderQuery;
use Thelia\Model\Map\CouponOrderTableMap;
@@ -70,12 +68,6 @@ abstract class CouponOrder implements ActiveRecordInterface
*/
protected $order_id;
- /**
- * The value for the code field.
- * @var string
- */
- protected $code;
-
/**
* The value for the value field.
* @var double
@@ -99,11 +91,6 @@ abstract class CouponOrder implements ActiveRecordInterface
*/
protected $aOrder;
- /**
- * @var Coupon
- */
- protected $aCoupon;
-
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
@@ -268,7 +255,7 @@ abstract class CouponOrder implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -388,17 +375,6 @@ abstract class CouponOrder implements ActiveRecordInterface
return $this->order_id;
}
- /**
- * Get the [code] column value.
- *
- * @return string
- */
- public function getCode()
- {
-
- return $this->code;
- }
-
/**
* Get the [value] column value.
*
@@ -496,31 +472,6 @@ abstract class CouponOrder implements ActiveRecordInterface
return $this;
} // setOrderId()
- /**
- * Set the value of [code] column.
- *
- * @param string $v new value
- * @return \Thelia\Model\CouponOrder The current object (for fluent API support)
- */
- public function setCode($v)
- {
- if ($v !== null) {
- $v = (string) $v;
- }
-
- if ($this->code !== $v) {
- $this->code = $v;
- $this->modifiedColumns[] = CouponOrderTableMap::CODE;
- }
-
- if ($this->aCoupon !== null && $this->aCoupon->getCode() !== $v) {
- $this->aCoupon = null;
- }
-
-
- return $this;
- } // setCode()
-
/**
* Set the value of [value] column.
*
@@ -627,19 +578,16 @@ abstract class CouponOrder implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CouponOrderTableMap::translateFieldName('OrderId', TableMap::TYPE_PHPNAME, $indexType)];
$this->order_id = (null !== $col) ? (int) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CouponOrderTableMap::translateFieldName('Code', TableMap::TYPE_PHPNAME, $indexType)];
- $this->code = (null !== $col) ? (string) $col : null;
-
- $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CouponOrderTableMap::translateFieldName('Value', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CouponOrderTableMap::translateFieldName('Value', TableMap::TYPE_PHPNAME, $indexType)];
$this->value = (null !== $col) ? (double) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CouponOrderTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CouponOrderTableMap::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 ? 5 + $startcol : CouponOrderTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CouponOrderTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
@@ -652,7 +600,7 @@ abstract class CouponOrder implements ActiveRecordInterface
$this->ensureConsistency();
}
- return $startcol + 6; // 6 = CouponOrderTableMap::NUM_HYDRATE_COLUMNS.
+ return $startcol + 5; // 5 = CouponOrderTableMap::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating \Thelia\Model\CouponOrder object", 0, $e);
@@ -677,9 +625,6 @@ abstract class CouponOrder implements ActiveRecordInterface
if ($this->aOrder !== null && $this->order_id !== $this->aOrder->getId()) {
$this->aOrder = null;
}
- if ($this->aCoupon !== null && $this->code !== $this->aCoupon->getCode()) {
- $this->aCoupon = null;
- }
} // ensureConsistency
/**
@@ -720,7 +665,6 @@ abstract class CouponOrder implements ActiveRecordInterface
if ($deep) { // also de-associate any related objects?
$this->aOrder = null;
- $this->aCoupon = null;
} // if (deep)
}
@@ -855,13 +799,6 @@ abstract class CouponOrder implements ActiveRecordInterface
$this->setOrder($this->aOrder);
}
- if ($this->aCoupon !== null) {
- if ($this->aCoupon->isModified() || $this->aCoupon->isNew()) {
- $affectedRows += $this->aCoupon->save($con);
- }
- $this->setCoupon($this->aCoupon);
- }
-
if ($this->isNew() || $this->isModified()) {
// persist changes
if ($this->isNew()) {
@@ -905,9 +842,6 @@ abstract class CouponOrder implements ActiveRecordInterface
if ($this->isColumnModified(CouponOrderTableMap::ORDER_ID)) {
$modifiedColumns[':p' . $index++] = 'ORDER_ID';
}
- if ($this->isColumnModified(CouponOrderTableMap::CODE)) {
- $modifiedColumns[':p' . $index++] = 'CODE';
- }
if ($this->isColumnModified(CouponOrderTableMap::VALUE)) {
$modifiedColumns[':p' . $index++] = 'VALUE';
}
@@ -934,9 +868,6 @@ abstract class CouponOrder implements ActiveRecordInterface
case 'ORDER_ID':
$stmt->bindValue($identifier, $this->order_id, PDO::PARAM_INT);
break;
- case 'CODE':
- $stmt->bindValue($identifier, $this->code, PDO::PARAM_STR);
- break;
case 'VALUE':
$stmt->bindValue($identifier, $this->value, PDO::PARAM_STR);
break;
@@ -1015,15 +946,12 @@ abstract class CouponOrder implements ActiveRecordInterface
return $this->getOrderId();
break;
case 2:
- return $this->getCode();
- break;
- case 3:
return $this->getValue();
break;
- case 4:
+ case 3:
return $this->getCreatedAt();
break;
- case 5:
+ case 4:
return $this->getUpdatedAt();
break;
default:
@@ -1057,10 +985,9 @@ abstract class CouponOrder implements ActiveRecordInterface
$result = array(
$keys[0] => $this->getId(),
$keys[1] => $this->getOrderId(),
- $keys[2] => $this->getCode(),
- $keys[3] => $this->getValue(),
- $keys[4] => $this->getCreatedAt(),
- $keys[5] => $this->getUpdatedAt(),
+ $keys[2] => $this->getValue(),
+ $keys[3] => $this->getCreatedAt(),
+ $keys[4] => $this->getUpdatedAt(),
);
$virtualColumns = $this->virtualColumns;
foreach($virtualColumns as $key => $virtualColumn)
@@ -1072,9 +999,6 @@ abstract class CouponOrder implements ActiveRecordInterface
if (null !== $this->aOrder) {
$result['Order'] = $this->aOrder->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
- if (null !== $this->aCoupon) {
- $result['Coupon'] = $this->aCoupon->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
- }
}
return $result;
@@ -1116,15 +1040,12 @@ abstract class CouponOrder implements ActiveRecordInterface
$this->setOrderId($value);
break;
case 2:
- $this->setCode($value);
- break;
- case 3:
$this->setValue($value);
break;
- case 4:
+ case 3:
$this->setCreatedAt($value);
break;
- case 5:
+ case 4:
$this->setUpdatedAt($value);
break;
} // switch()
@@ -1153,10 +1074,9 @@ abstract class CouponOrder implements ActiveRecordInterface
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setOrderId($arr[$keys[1]]);
- if (array_key_exists($keys[2], $arr)) $this->setCode($arr[$keys[2]]);
- if (array_key_exists($keys[3], $arr)) $this->setValue($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[2], $arr)) $this->setValue($arr[$keys[2]]);
+ if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]);
+ if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]);
}
/**
@@ -1170,7 +1090,6 @@ abstract class CouponOrder implements ActiveRecordInterface
if ($this->isColumnModified(CouponOrderTableMap::ID)) $criteria->add(CouponOrderTableMap::ID, $this->id);
if ($this->isColumnModified(CouponOrderTableMap::ORDER_ID)) $criteria->add(CouponOrderTableMap::ORDER_ID, $this->order_id);
- if ($this->isColumnModified(CouponOrderTableMap::CODE)) $criteria->add(CouponOrderTableMap::CODE, $this->code);
if ($this->isColumnModified(CouponOrderTableMap::VALUE)) $criteria->add(CouponOrderTableMap::VALUE, $this->value);
if ($this->isColumnModified(CouponOrderTableMap::CREATED_AT)) $criteria->add(CouponOrderTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(CouponOrderTableMap::UPDATED_AT)) $criteria->add(CouponOrderTableMap::UPDATED_AT, $this->updated_at);
@@ -1238,7 +1157,6 @@ abstract class CouponOrder implements ActiveRecordInterface
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
{
$copyObj->setOrderId($this->getOrderId());
- $copyObj->setCode($this->getCode());
$copyObj->setValue($this->getValue());
$copyObj->setCreatedAt($this->getCreatedAt());
$copyObj->setUpdatedAt($this->getUpdatedAt());
@@ -1321,59 +1239,6 @@ abstract class CouponOrder implements ActiveRecordInterface
return $this->aOrder;
}
- /**
- * Declares an association between this object and a ChildCoupon object.
- *
- * @param ChildCoupon $v
- * @return \Thelia\Model\CouponOrder The current object (for fluent API support)
- * @throws PropelException
- */
- public function setCoupon(ChildCoupon $v = null)
- {
- if ($v === null) {
- $this->setCode(NULL);
- } else {
- $this->setCode($v->getCode());
- }
-
- $this->aCoupon = $v;
-
- // Add binding for other direction of this n:n relationship.
- // If this object has already been added to the ChildCoupon object, it will not be re-added.
- if ($v !== null) {
- $v->addCouponOrder($this);
- }
-
-
- return $this;
- }
-
-
- /**
- * Get the associated ChildCoupon object
- *
- * @param ConnectionInterface $con Optional Connection object.
- * @return ChildCoupon The associated ChildCoupon object.
- * @throws PropelException
- */
- public function getCoupon(ConnectionInterface $con = null)
- {
- if ($this->aCoupon === null && (($this->code !== "" && $this->code !== null))) {
- $this->aCoupon = ChildCouponQuery::create()
- ->filterByCouponOrder($this) // here
- ->findOne($con);
- /* The following can be used additionally to
- guarantee the related object contains a reference
- to this object. This level of coupling may, however, be
- undesirable since it could result in an only partially populated collection
- in the referenced object.
- $this->aCoupon->addCouponOrders($this);
- */
- }
-
- return $this->aCoupon;
- }
-
/**
* Clears the current object and sets all attributes to their default values
*/
@@ -1381,7 +1246,6 @@ abstract class CouponOrder implements ActiveRecordInterface
{
$this->id = null;
$this->order_id = null;
- $this->code = null;
$this->value = null;
$this->created_at = null;
$this->updated_at = null;
@@ -1407,7 +1271,6 @@ abstract class CouponOrder implements ActiveRecordInterface
} // if ($deep)
$this->aOrder = null;
- $this->aCoupon = null;
}
/**
diff --git a/core/lib/Thelia/Model/Base/CouponOrderQuery.php b/core/lib/Thelia/Model/Base/CouponOrderQuery.php
old mode 100755
new mode 100644
index e3a95ea1a..255d69504
--- a/core/lib/Thelia/Model/Base/CouponOrderQuery.php
+++ b/core/lib/Thelia/Model/Base/CouponOrderQuery.php
@@ -23,14 +23,12 @@ use Thelia\Model\Map\CouponOrderTableMap;
*
* @method ChildCouponOrderQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildCouponOrderQuery orderByOrderId($order = Criteria::ASC) Order by the order_id column
- * @method ChildCouponOrderQuery orderByCode($order = Criteria::ASC) Order by the code column
* @method ChildCouponOrderQuery orderByValue($order = Criteria::ASC) Order by the value column
* @method ChildCouponOrderQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ChildCouponOrderQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method ChildCouponOrderQuery groupById() Group by the id column
* @method ChildCouponOrderQuery groupByOrderId() Group by the order_id column
- * @method ChildCouponOrderQuery groupByCode() Group by the code column
* @method ChildCouponOrderQuery groupByValue() Group by the value column
* @method ChildCouponOrderQuery groupByCreatedAt() Group by the created_at column
* @method ChildCouponOrderQuery groupByUpdatedAt() Group by the updated_at column
@@ -43,23 +41,17 @@ use Thelia\Model\Map\CouponOrderTableMap;
* @method ChildCouponOrderQuery rightJoinOrder($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Order relation
* @method ChildCouponOrderQuery innerJoinOrder($relationAlias = null) Adds a INNER JOIN clause to the query using the Order relation
*
- * @method ChildCouponOrderQuery leftJoinCoupon($relationAlias = null) Adds a LEFT JOIN clause to the query using the Coupon relation
- * @method ChildCouponOrderQuery rightJoinCoupon($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Coupon relation
- * @method ChildCouponOrderQuery innerJoinCoupon($relationAlias = null) Adds a INNER JOIN clause to the query using the Coupon relation
- *
* @method ChildCouponOrder findOne(ConnectionInterface $con = null) Return the first ChildCouponOrder matching the query
* @method ChildCouponOrder findOneOrCreate(ConnectionInterface $con = null) Return the first ChildCouponOrder matching the query, or a new ChildCouponOrder object populated from the query conditions when no match is found
*
* @method ChildCouponOrder findOneById(int $id) Return the first ChildCouponOrder filtered by the id column
* @method ChildCouponOrder findOneByOrderId(int $order_id) Return the first ChildCouponOrder filtered by the order_id column
- * @method ChildCouponOrder findOneByCode(string $code) Return the first ChildCouponOrder filtered by the code column
* @method ChildCouponOrder findOneByValue(double $value) Return the first ChildCouponOrder filtered by the value column
* @method ChildCouponOrder findOneByCreatedAt(string $created_at) Return the first ChildCouponOrder filtered by the created_at column
* @method ChildCouponOrder findOneByUpdatedAt(string $updated_at) Return the first ChildCouponOrder filtered by the updated_at column
*
* @method array findById(int $id) Return ChildCouponOrder objects filtered by the id column
* @method array findByOrderId(int $order_id) Return ChildCouponOrder objects filtered by the order_id column
- * @method array findByCode(string $code) Return ChildCouponOrder objects filtered by the code column
* @method array findByValue(double $value) Return ChildCouponOrder objects filtered by the value column
* @method array findByCreatedAt(string $created_at) Return ChildCouponOrder objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ChildCouponOrder objects filtered by the updated_at column
@@ -151,7 +143,7 @@ abstract class CouponOrderQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
- $sql = 'SELECT ID, ORDER_ID, CODE, VALUE, CREATED_AT, UPDATED_AT FROM coupon_order WHERE ID = :p0';
+ $sql = 'SELECT ID, ORDER_ID, VALUE, CREATED_AT, UPDATED_AT FROM coupon_order WHERE ID = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -324,35 +316,6 @@ abstract class CouponOrderQuery extends ModelCriteria
return $this->addUsingAlias(CouponOrderTableMap::ORDER_ID, $orderId, $comparison);
}
- /**
- * Filter the query on the code column
- *
- * Example usage:
- *
- * $query->filterByCode('fooValue'); // WHERE code = 'fooValue'
- * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%'
- *
- *
- * @param string $code 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 ChildCouponOrderQuery The current query, for fluid interface
- */
- public function filterByCode($code = null, $comparison = null)
- {
- if (null === $comparison) {
- if (is_array($code)) {
- $comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $code)) {
- $code = str_replace('*', '%', $code);
- $comparison = Criteria::LIKE;
- }
- }
-
- return $this->addUsingAlias(CouponOrderTableMap::CODE, $code, $comparison);
- }
-
/**
* Filter the query on the value column
*
@@ -555,81 +518,6 @@ abstract class CouponOrderQuery extends ModelCriteria
->useQuery($relationAlias ? $relationAlias : 'Order', '\Thelia\Model\OrderQuery');
}
- /**
- * Filter the query by a related \Thelia\Model\Coupon object
- *
- * @param \Thelia\Model\Coupon|ObjectCollection $coupon The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
- *
- * @return ChildCouponOrderQuery The current query, for fluid interface
- */
- public function filterByCoupon($coupon, $comparison = null)
- {
- if ($coupon instanceof \Thelia\Model\Coupon) {
- return $this
- ->addUsingAlias(CouponOrderTableMap::CODE, $coupon->getCode(), $comparison);
- } elseif ($coupon instanceof ObjectCollection) {
- if (null === $comparison) {
- $comparison = Criteria::IN;
- }
-
- return $this
- ->addUsingAlias(CouponOrderTableMap::CODE, $coupon->toKeyValue('PrimaryKey', 'Code'), $comparison);
- } else {
- throw new PropelException('filterByCoupon() only accepts arguments of type \Thelia\Model\Coupon or Collection');
- }
- }
-
- /**
- * Adds a JOIN clause to the query using the Coupon relation
- *
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
- *
- * @return ChildCouponOrderQuery The current query, for fluid interface
- */
- public function joinCoupon($relationAlias = null, $joinType = Criteria::INNER_JOIN)
- {
- $tableMap = $this->getTableMap();
- $relationMap = $tableMap->getRelation('Coupon');
-
- // create a ModelJoin object for this join
- $join = new ModelJoin();
- $join->setJoinType($joinType);
- $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
- if ($previousJoin = $this->getPreviousJoin()) {
- $join->setPreviousJoin($previousJoin);
- }
-
- // add the ModelJoin to the current object
- if ($relationAlias) {
- $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
- $this->addJoinObject($join, $relationAlias);
- } else {
- $this->addJoinObject($join, 'Coupon');
- }
-
- return $this;
- }
-
- /**
- * Use the Coupon relation Coupon object
- *
- * @see useQuery()
- *
- * @param string $relationAlias optional alias for the relation,
- * to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
- *
- * @return \Thelia\Model\CouponQuery A secondary query class using the current class as primary query
- */
- public function useCouponQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
- {
- return $this
- ->joinCoupon($relationAlias, $joinType)
- ->useQuery($relationAlias ? $relationAlias : 'Coupon', '\Thelia\Model\CouponQuery');
- }
-
/**
* Exclude object from result
*
diff --git a/core/lib/Thelia/Model/Base/CouponQuery.php b/core/lib/Thelia/Model/Base/CouponQuery.php
old mode 100755
new mode 100644
index c7ae0eabd..e92380879
--- a/core/lib/Thelia/Model/Base/CouponQuery.php
+++ b/core/lib/Thelia/Model/Base/CouponQuery.php
@@ -25,9 +25,6 @@ use Thelia\Model\Map\CouponTableMap;
* @method ChildCouponQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildCouponQuery orderByCode($order = Criteria::ASC) Order by the code column
* @method ChildCouponQuery orderByType($order = Criteria::ASC) Order by the type column
- * @method ChildCouponQuery orderByTitle($order = Criteria::ASC) Order by the title column
- * @method ChildCouponQuery orderByShortDescription($order = Criteria::ASC) Order by the short_description column
- * @method ChildCouponQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method ChildCouponQuery orderByAmount($order = Criteria::ASC) Order by the amount column
* @method ChildCouponQuery orderByIsUsed($order = Criteria::ASC) Order by the is_used column
* @method ChildCouponQuery orderByIsEnabled($order = Criteria::ASC) Order by the is_enabled column
@@ -44,9 +41,6 @@ use Thelia\Model\Map\CouponTableMap;
* @method ChildCouponQuery groupById() Group by the id column
* @method ChildCouponQuery groupByCode() Group by the code column
* @method ChildCouponQuery groupByType() Group by the type column
- * @method ChildCouponQuery groupByTitle() Group by the title column
- * @method ChildCouponQuery groupByShortDescription() Group by the short_description column
- * @method ChildCouponQuery groupByDescription() Group by the description column
* @method ChildCouponQuery groupByAmount() Group by the amount column
* @method ChildCouponQuery groupByIsUsed() Group by the is_used column
* @method ChildCouponQuery groupByIsEnabled() Group by the is_enabled column
@@ -64,10 +58,6 @@ use Thelia\Model\Map\CouponTableMap;
* @method ChildCouponQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method ChildCouponQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
- * @method ChildCouponQuery leftJoinCouponOrder($relationAlias = null) Adds a LEFT JOIN clause to the query using the CouponOrder relation
- * @method ChildCouponQuery rightJoinCouponOrder($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CouponOrder relation
- * @method ChildCouponQuery innerJoinCouponOrder($relationAlias = null) Adds a INNER JOIN clause to the query using the CouponOrder relation
- *
* @method ChildCouponQuery leftJoinCouponI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the CouponI18n relation
* @method ChildCouponQuery rightJoinCouponI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CouponI18n relation
* @method ChildCouponQuery innerJoinCouponI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the CouponI18n relation
@@ -82,9 +72,6 @@ use Thelia\Model\Map\CouponTableMap;
* @method ChildCoupon findOneById(int $id) Return the first ChildCoupon filtered by the id column
* @method ChildCoupon findOneByCode(string $code) Return the first ChildCoupon filtered by the code column
* @method ChildCoupon findOneByType(string $type) Return the first ChildCoupon filtered by the type column
- * @method ChildCoupon findOneByTitle(string $title) Return the first ChildCoupon filtered by the title column
- * @method ChildCoupon findOneByShortDescription(string $short_description) Return the first ChildCoupon filtered by the short_description column
- * @method ChildCoupon findOneByDescription(string $description) Return the first ChildCoupon filtered by the description column
* @method ChildCoupon findOneByAmount(double $amount) Return the first ChildCoupon filtered by the amount column
* @method ChildCoupon findOneByIsUsed(int $is_used) Return the first ChildCoupon filtered by the is_used column
* @method ChildCoupon findOneByIsEnabled(int $is_enabled) Return the first ChildCoupon filtered by the is_enabled column
@@ -101,9 +88,6 @@ use Thelia\Model\Map\CouponTableMap;
* @method array findById(int $id) Return ChildCoupon objects filtered by the id column
* @method array findByCode(string $code) Return ChildCoupon objects filtered by the code column
* @method array findByType(string $type) Return ChildCoupon objects filtered by the type column
- * @method array findByTitle(string $title) Return ChildCoupon objects filtered by the title column
- * @method array findByShortDescription(string $short_description) Return ChildCoupon objects filtered by the short_description column
- * @method array findByDescription(string $description) Return ChildCoupon objects filtered by the description column
* @method array findByAmount(double $amount) Return ChildCoupon objects filtered by the amount column
* @method array findByIsUsed(int $is_used) Return ChildCoupon objects filtered by the is_used column
* @method array findByIsEnabled(int $is_enabled) Return ChildCoupon objects filtered by the is_enabled column
@@ -211,7 +195,7 @@ abstract class CouponQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
- $sql = 'SELECT ID, CODE, TYPE, TITLE, SHORT_DESCRIPTION, DESCRIPTION, AMOUNT, IS_USED, IS_ENABLED, EXPIRATION_DATE, SERIALIZED_RULES, IS_CUMULATIVE, IS_REMOVING_POSTAGE, MAX_USAGE, IS_AVAILABLE_ON_SPECIAL_OFFERS, CREATED_AT, UPDATED_AT, VERSION FROM coupon WHERE ID = :p0';
+ $sql = 'SELECT ID, CODE, TYPE, AMOUNT, IS_USED, IS_ENABLED, EXPIRATION_DATE, SERIALIZED_RULES, IS_CUMULATIVE, IS_REMOVING_POSTAGE, MAX_USAGE, IS_AVAILABLE_ON_SPECIAL_OFFERS, CREATED_AT, UPDATED_AT, VERSION FROM coupon WHERE ID = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -399,93 +383,6 @@ abstract class CouponQuery extends ModelCriteria
return $this->addUsingAlias(CouponTableMap::TYPE, $type, $comparison);
}
- /**
- * Filter the query on the title column
- *
- * Example usage:
- *
- * $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
- * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
- *
- *
- * @param string $title 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 ChildCouponQuery The current query, for fluid interface
- */
- public function filterByTitle($title = null, $comparison = null)
- {
- if (null === $comparison) {
- if (is_array($title)) {
- $comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $title)) {
- $title = str_replace('*', '%', $title);
- $comparison = Criteria::LIKE;
- }
- }
-
- return $this->addUsingAlias(CouponTableMap::TITLE, $title, $comparison);
- }
-
- /**
- * Filter the query on the short_description column
- *
- * Example usage:
- *
- * $query->filterByShortDescription('fooValue'); // WHERE short_description = 'fooValue'
- * $query->filterByShortDescription('%fooValue%'); // WHERE short_description LIKE '%fooValue%'
- *
- *
- * @param string $shortDescription 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 ChildCouponQuery The current query, for fluid interface
- */
- public function filterByShortDescription($shortDescription = null, $comparison = null)
- {
- if (null === $comparison) {
- if (is_array($shortDescription)) {
- $comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $shortDescription)) {
- $shortDescription = str_replace('*', '%', $shortDescription);
- $comparison = Criteria::LIKE;
- }
- }
-
- return $this->addUsingAlias(CouponTableMap::SHORT_DESCRIPTION, $shortDescription, $comparison);
- }
-
- /**
- * Filter the query on the description column
- *
- * Example usage:
- *
- * $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
- * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
- *
- *
- * @param string $description 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 ChildCouponQuery The current query, for fluid interface
- */
- public function filterByDescription($description = null, $comparison = null)
- {
- if (null === $comparison) {
- if (is_array($description)) {
- $comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $description)) {
- $description = str_replace('*', '%', $description);
- $comparison = Criteria::LIKE;
- }
- }
-
- return $this->addUsingAlias(CouponTableMap::DESCRIPTION, $description, $comparison);
- }
-
/**
* Filter the query on the amount column
*
@@ -958,79 +855,6 @@ abstract class CouponQuery extends ModelCriteria
return $this->addUsingAlias(CouponTableMap::VERSION, $version, $comparison);
}
- /**
- * Filter the query by a related \Thelia\Model\CouponOrder object
- *
- * @param \Thelia\Model\CouponOrder|ObjectCollection $couponOrder the related object to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
- *
- * @return ChildCouponQuery The current query, for fluid interface
- */
- public function filterByCouponOrder($couponOrder, $comparison = null)
- {
- if ($couponOrder instanceof \Thelia\Model\CouponOrder) {
- return $this
- ->addUsingAlias(CouponTableMap::CODE, $couponOrder->getCode(), $comparison);
- } elseif ($couponOrder instanceof ObjectCollection) {
- return $this
- ->useCouponOrderQuery()
- ->filterByPrimaryKeys($couponOrder->getPrimaryKeys())
- ->endUse();
- } else {
- throw new PropelException('filterByCouponOrder() only accepts arguments of type \Thelia\Model\CouponOrder or Collection');
- }
- }
-
- /**
- * Adds a JOIN clause to the query using the CouponOrder relation
- *
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
- *
- * @return ChildCouponQuery The current query, for fluid interface
- */
- public function joinCouponOrder($relationAlias = null, $joinType = Criteria::INNER_JOIN)
- {
- $tableMap = $this->getTableMap();
- $relationMap = $tableMap->getRelation('CouponOrder');
-
- // create a ModelJoin object for this join
- $join = new ModelJoin();
- $join->setJoinType($joinType);
- $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
- if ($previousJoin = $this->getPreviousJoin()) {
- $join->setPreviousJoin($previousJoin);
- }
-
- // add the ModelJoin to the current object
- if ($relationAlias) {
- $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
- $this->addJoinObject($join, $relationAlias);
- } else {
- $this->addJoinObject($join, 'CouponOrder');
- }
-
- return $this;
- }
-
- /**
- * Use the CouponOrder relation CouponOrder object
- *
- * @see useQuery()
- *
- * @param string $relationAlias optional alias for the relation,
- * to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
- *
- * @return \Thelia\Model\CouponOrderQuery A secondary query class using the current class as primary query
- */
- public function useCouponOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
- {
- return $this
- ->joinCouponOrder($relationAlias, $joinType)
- ->useQuery($relationAlias ? $relationAlias : 'CouponOrder', '\Thelia\Model\CouponOrderQuery');
- }
-
/**
* Filter the query by a related \Thelia\Model\CouponI18n object
*
@@ -1345,7 +1169,7 @@ abstract class CouponQuery extends ModelCriteria
*
* @return ChildCouponQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'CouponI18n';
@@ -1363,7 +1187,7 @@ abstract class CouponQuery extends ModelCriteria
*
* @return ChildCouponQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -1384,7 +1208,7 @@ abstract class CouponQuery extends ModelCriteria
*
* @return ChildCouponI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/CouponRule.php b/core/lib/Thelia/Model/Base/CouponRule.php
deleted file mode 100755
index 8a34f5d0b..000000000
--- a/core/lib/Thelia/Model/Base/CouponRule.php
+++ /dev/null
@@ -1,1534 +0,0 @@
-modifiedColumns);
- }
-
- /**
- * Has specified column been modified?
- *
- * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID
- * @return boolean True if $col has been modified.
- */
- public function isColumnModified($col)
- {
- return in_array($col, $this->modifiedColumns);
- }
-
- /**
- * Get the columns that have been modified in this object.
- * @return array A unique list of the modified column names for this object.
- */
- public function getModifiedColumns()
- {
- return array_unique($this->modifiedColumns);
- }
-
- /**
- * Returns whether the object has ever been saved. This will
- * be false, if the object was retrieved from storage or was created
- * and then saved.
- *
- * @return true, if the object has never been persisted.
- */
- public function isNew()
- {
- return $this->new;
- }
-
- /**
- * Setter for the isNew attribute. This method will be called
- * by Propel-generated children and objects.
- *
- * @param boolean $b the state of the object.
- */
- public function setNew($b)
- {
- $this->new = (Boolean) $b;
- }
-
- /**
- * Whether this object has been deleted.
- * @return boolean The deleted state of this object.
- */
- public function isDeleted()
- {
- return $this->deleted;
- }
-
- /**
- * Specify whether this object has been deleted.
- * @param boolean $b The deleted state of this object.
- * @return void
- */
- public function setDeleted($b)
- {
- $this->deleted = (Boolean) $b;
- }
-
- /**
- * Sets the modified state for the object to be false.
- * @param string $col If supplied, only the specified column is reset.
- * @return void
- */
- public function resetModified($col = null)
- {
- if (null !== $col) {
- while (false !== ($offset = array_search($col, $this->modifiedColumns))) {
- array_splice($this->modifiedColumns, $offset, 1);
- }
- } else {
- $this->modifiedColumns = array();
- }
- }
-
- /**
- * Compares this with another CouponRule instance. If
- * obj is an instance of CouponRule, delegates to
- * equals(CouponRule). Otherwise, returns false.
- *
- * @param obj The object to compare to.
- * @return Whether equal to the object specified.
- */
- public function equals($obj)
- {
- $thisclazz = get_class($this);
- if (!is_object($obj) || !($obj instanceof $thisclazz)) {
- return false;
- }
-
- if ($this === $obj) {
- return true;
- }
-
- if (null === $this->getPrimaryKey()
- || null === $obj->getPrimaryKey()) {
- return false;
- }
-
- return $this->getPrimaryKey() === $obj->getPrimaryKey();
- }
-
- /**
- * If the primary key is not null, return the hashcode of the
- * primary key. Otherwise, return the hash code of the object.
- *
- * @return int Hashcode
- */
- public function hashCode()
- {
- if (null !== $this->getPrimaryKey()) {
- return crc32(serialize($this->getPrimaryKey()));
- }
-
- return crc32(serialize(clone $this));
- }
-
- /**
- * Get the associative array of the virtual columns in this object
- *
- * @param string $name The virtual column name
- *
- * @return array
- */
- public function getVirtualColumns()
- {
- return $this->virtualColumns;
- }
-
- /**
- * Checks the existence of a virtual column in this object
- *
- * @return boolean
- */
- public function hasVirtualColumn($name)
- {
- return array_key_exists($name, $this->virtualColumns);
- }
-
- /**
- * Get the value of a virtual column in this object
- *
- * @return mixed
- */
- public function getVirtualColumn($name)
- {
- if (!$this->hasVirtualColumn($name)) {
- throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name));
- }
-
- return $this->virtualColumns[$name];
- }
-
- /**
- * Set the value of a virtual column in this object
- *
- * @param string $name The virtual column name
- * @param mixed $value The value to give to the virtual column
- *
- * @return CouponRule The current object, for fluid interface
- */
- public function setVirtualColumn($name, $value)
- {
- $this->virtualColumns[$name] = $value;
-
- return $this;
- }
-
- /**
- * Logs a message using Propel::log().
- *
- * @param string $msg
- * @param int $priority One of the Propel::LOG_* logging levels
- * @return boolean
- */
- protected function log($msg, $priority = Propel::LOG_INFO)
- {
- return Propel::log(get_class($this) . ': ' . $msg, $priority);
- }
-
- /**
- * Populate the current object from a string, using a given parser format
- *
- * $book = new Book();
- * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
- *
- *
- * @param mixed $parser A AbstractParser instance,
- * or a format name ('XML', 'YAML', 'JSON', 'CSV')
- * @param string $data The source data to import from
- *
- * @return CouponRule The current object, for fluid interface
- */
- public function importFrom($parser, $data)
- {
- if (!$parser instanceof AbstractParser) {
- $parser = AbstractParser::getParser($parser);
- }
-
- return $this->fromArray($parser->toArray($data), TableMap::TYPE_PHPNAME);
- }
-
- /**
- * Export the current object properties to a string, using a given parser format
- *
- * $book = BookQuery::create()->findPk(9012);
- * echo $book->exportTo('JSON');
- * => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}');
- *
- *
- * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE.
- * @return string The exported data
- */
- public function exportTo($parser, $includeLazyLoadColumns = true)
- {
- if (!$parser instanceof AbstractParser) {
- $parser = AbstractParser::getParser($parser);
- }
-
- return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true));
- }
-
- /**
- * Clean up internal collections prior to serializing
- * Avoids recursive loops that turn into segmentation faults when serializing
- */
- public function __sleep()
- {
- $this->clearAllReferences();
-
- return array_keys(get_object_vars($this));
- }
-
- /**
- * Get the [id] column value.
- *
- * @return int
- */
- public function getId()
- {
-
- return $this->id;
- }
-
- /**
- * Get the [coupon_id] column value.
- *
- * @return int
- */
- public function getCouponId()
- {
-
- return $this->coupon_id;
- }
-
- /**
- * Get the [controller] column value.
- *
- * @return string
- */
- public function getController()
- {
-
- return $this->controller;
- }
-
- /**
- * Get the [operation] column value.
- *
- * @return string
- */
- public function getOperation()
- {
-
- return $this->operation;
- }
-
- /**
- * Get the [value] column value.
- *
- * @return double
- */
- public function getValue()
- {
-
- return $this->value;
- }
-
- /**
- * Get the [optionally formatted] temporal [created_at] 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 getCreatedAt($format = NULL)
- {
- if ($format === null) {
- return $this->created_at;
- } else {
- return $this->created_at !== null ? $this->created_at->format($format) : null;
- }
- }
-
- /**
- * Get the [optionally formatted] temporal [updated_at] 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 getUpdatedAt($format = NULL)
- {
- if ($format === null) {
- return $this->updated_at;
- } else {
- return $this->updated_at !== null ? $this->updated_at->format($format) : null;
- }
- }
-
- /**
- * Set the value of [id] column.
- *
- * @param int $v new value
- * @return \Thelia\Model\CouponRule The current object (for fluent API support)
- */
- public function setId($v)
- {
- if ($v !== null) {
- $v = (int) $v;
- }
-
- if ($this->id !== $v) {
- $this->id = $v;
- $this->modifiedColumns[] = CouponRuleTableMap::ID;
- }
-
-
- return $this;
- } // setId()
-
- /**
- * Set the value of [coupon_id] column.
- *
- * @param int $v new value
- * @return \Thelia\Model\CouponRule The current object (for fluent API support)
- */
- public function setCouponId($v)
- {
- if ($v !== null) {
- $v = (int) $v;
- }
-
- if ($this->coupon_id !== $v) {
- $this->coupon_id = $v;
- $this->modifiedColumns[] = CouponRuleTableMap::COUPON_ID;
- }
-
- if ($this->aCoupon !== null && $this->aCoupon->getId() !== $v) {
- $this->aCoupon = null;
- }
-
-
- return $this;
- } // setCouponId()
-
- /**
- * Set the value of [controller] column.
- *
- * @param string $v new value
- * @return \Thelia\Model\CouponRule The current object (for fluent API support)
- */
- public function setController($v)
- {
- if ($v !== null) {
- $v = (string) $v;
- }
-
- if ($this->controller !== $v) {
- $this->controller = $v;
- $this->modifiedColumns[] = CouponRuleTableMap::CONTROLLER;
- }
-
-
- return $this;
- } // setController()
-
- /**
- * Set the value of [operation] column.
- *
- * @param string $v new value
- * @return \Thelia\Model\CouponRule The current object (for fluent API support)
- */
- public function setOperation($v)
- {
- if ($v !== null) {
- $v = (string) $v;
- }
-
- if ($this->operation !== $v) {
- $this->operation = $v;
- $this->modifiedColumns[] = CouponRuleTableMap::OPERATION;
- }
-
-
- return $this;
- } // setOperation()
-
- /**
- * Set the value of [value] column.
- *
- * @param double $v new value
- * @return \Thelia\Model\CouponRule The current object (for fluent API support)
- */
- public function setValue($v)
- {
- if ($v !== null) {
- $v = (double) $v;
- }
-
- if ($this->value !== $v) {
- $this->value = $v;
- $this->modifiedColumns[] = CouponRuleTableMap::VALUE;
- }
-
-
- return $this;
- } // setValue()
-
- /**
- * Sets the value of [created_at] 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\CouponRule The current object (for fluent API support)
- */
- public function setCreatedAt($v)
- {
- $dt = PropelDateTime::newInstance($v, null, '\DateTime');
- if ($this->created_at !== null || $dt !== null) {
- if ($dt !== $this->created_at) {
- $this->created_at = $dt;
- $this->modifiedColumns[] = CouponRuleTableMap::CREATED_AT;
- }
- } // if either are not null
-
-
- return $this;
- } // setCreatedAt()
-
- /**
- * Sets the value of [updated_at] 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\CouponRule The current object (for fluent API support)
- */
- public function setUpdatedAt($v)
- {
- $dt = PropelDateTime::newInstance($v, null, '\DateTime');
- if ($this->updated_at !== null || $dt !== null) {
- if ($dt !== $this->updated_at) {
- $this->updated_at = $dt;
- $this->modifiedColumns[] = CouponRuleTableMap::UPDATED_AT;
- }
- } // if either are not null
-
-
- return $this;
- } // setUpdatedAt()
-
- /**
- * Indicates whether the columns in this object are only set to default values.
- *
- * This method can be used in conjunction with isModified() to indicate whether an object is both
- * modified _and_ has some values set which are non-default.
- *
- * @return boolean Whether the columns in this object are only been set with default values.
- */
- public function hasOnlyDefaultValues()
- {
- // otherwise, everything was equal, so return TRUE
- return true;
- } // hasOnlyDefaultValues()
-
- /**
- * Hydrates (populates) the object variables with values from the database resultset.
- *
- * An offset (0-based "start column") is specified so that objects can be hydrated
- * with a subset of the columns in the resultset rows. This is needed, for example,
- * for results of JOIN queries where the resultset row includes columns from two or
- * more tables.
- *
- * @param array $row The row returned by DataFetcher->fetch().
- * @param int $startcol 0-based offset column which indicates which restultset column to start with.
- * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
- * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
- One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
- * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
- *
- * @return int next starting column
- * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
- */
- public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
- {
- try {
-
-
- $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CouponRuleTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
- $this->id = (null !== $col) ? (int) $col : null;
-
- $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CouponRuleTableMap::translateFieldName('CouponId', TableMap::TYPE_PHPNAME, $indexType)];
- $this->coupon_id = (null !== $col) ? (int) $col : null;
-
- $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CouponRuleTableMap::translateFieldName('Controller', TableMap::TYPE_PHPNAME, $indexType)];
- $this->controller = (null !== $col) ? (string) $col : null;
-
- $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CouponRuleTableMap::translateFieldName('Operation', TableMap::TYPE_PHPNAME, $indexType)];
- $this->operation = (null !== $col) ? (string) $col : null;
-
- $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CouponRuleTableMap::translateFieldName('Value', TableMap::TYPE_PHPNAME, $indexType)];
- $this->value = (null !== $col) ? (double) $col : null;
-
- $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CouponRuleTableMap::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 : CouponRuleTableMap::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;
- $this->resetModified();
-
- $this->setNew(false);
-
- if ($rehydrate) {
- $this->ensureConsistency();
- }
-
- return $startcol + 7; // 7 = CouponRuleTableMap::NUM_HYDRATE_COLUMNS.
-
- } catch (Exception $e) {
- throw new PropelException("Error populating \Thelia\Model\CouponRule object", 0, $e);
- }
- }
-
- /**
- * Checks and repairs the internal consistency of the object.
- *
- * This method is executed after an already-instantiated object is re-hydrated
- * from the database. It exists to check any foreign keys to make sure that
- * the objects related to the current object are correct based on foreign key.
- *
- * You can override this method in the stub class, but you should always invoke
- * the base method from the overridden method (i.e. parent::ensureConsistency()),
- * in case your model changes.
- *
- * @throws PropelException
- */
- public function ensureConsistency()
- {
- if ($this->aCoupon !== null && $this->coupon_id !== $this->aCoupon->getId()) {
- $this->aCoupon = null;
- }
- } // ensureConsistency
-
- /**
- * Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
- *
- * This will only work if the object has been saved and has a valid primary key set.
- *
- * @param boolean $deep (optional) Whether to also de-associated any related objects.
- * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use.
- * @return void
- * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
- */
- public function reload($deep = false, ConnectionInterface $con = null)
- {
- if ($this->isDeleted()) {
- throw new PropelException("Cannot reload a deleted object.");
- }
-
- if ($this->isNew()) {
- throw new PropelException("Cannot reload an unsaved object.");
- }
-
- if ($con === null) {
- $con = Propel::getServiceContainer()->getReadConnection(CouponRuleTableMap::DATABASE_NAME);
- }
-
- // We don't need to alter the object instance pool; we're just modifying this instance
- // already in the pool.
-
- $dataFetcher = ChildCouponRuleQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con);
- $row = $dataFetcher->fetch();
- $dataFetcher->close();
- if (!$row) {
- throw new PropelException('Cannot find matching row in the database to reload object values.');
- }
- $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate
-
- if ($deep) { // also de-associate any related objects?
-
- $this->aCoupon = null;
- } // if (deep)
- }
-
- /**
- * Removes this object from datastore and sets delete attribute.
- *
- * @param ConnectionInterface $con
- * @return void
- * @throws PropelException
- * @see CouponRule::setDeleted()
- * @see CouponRule::isDeleted()
- */
- public function delete(ConnectionInterface $con = null)
- {
- if ($this->isDeleted()) {
- throw new PropelException("This object has already been deleted.");
- }
-
- if ($con === null) {
- $con = Propel::getServiceContainer()->getWriteConnection(CouponRuleTableMap::DATABASE_NAME);
- }
-
- $con->beginTransaction();
- try {
- $deleteQuery = ChildCouponRuleQuery::create()
- ->filterByPrimaryKey($this->getPrimaryKey());
- $ret = $this->preDelete($con);
- if ($ret) {
- $deleteQuery->delete($con);
- $this->postDelete($con);
- $con->commit();
- $this->setDeleted(true);
- } else {
- $con->commit();
- }
- } catch (Exception $e) {
- $con->rollBack();
- throw $e;
- }
- }
-
- /**
- * Persists this object to the database.
- *
- * If the object is new, it inserts it; otherwise an update is performed.
- * All modified related objects will also be persisted in the doSave()
- * method. This method wraps all precipitate database operations in a
- * single transaction.
- *
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
- * @see doSave()
- */
- public function save(ConnectionInterface $con = null)
- {
- if ($this->isDeleted()) {
- throw new PropelException("You cannot save an object that has been deleted.");
- }
-
- if ($con === null) {
- $con = Propel::getServiceContainer()->getWriteConnection(CouponRuleTableMap::DATABASE_NAME);
- }
-
- $con->beginTransaction();
- $isInsert = $this->isNew();
- try {
- $ret = $this->preSave($con);
- if ($isInsert) {
- $ret = $ret && $this->preInsert($con);
- // timestampable behavior
- if (!$this->isColumnModified(CouponRuleTableMap::CREATED_AT)) {
- $this->setCreatedAt(time());
- }
- if (!$this->isColumnModified(CouponRuleTableMap::UPDATED_AT)) {
- $this->setUpdatedAt(time());
- }
- } else {
- $ret = $ret && $this->preUpdate($con);
- // timestampable behavior
- if ($this->isModified() && !$this->isColumnModified(CouponRuleTableMap::UPDATED_AT)) {
- $this->setUpdatedAt(time());
- }
- }
- if ($ret) {
- $affectedRows = $this->doSave($con);
- if ($isInsert) {
- $this->postInsert($con);
- } else {
- $this->postUpdate($con);
- }
- $this->postSave($con);
- CouponRuleTableMap::addInstanceToPool($this);
- } else {
- $affectedRows = 0;
- }
- $con->commit();
-
- return $affectedRows;
- } catch (Exception $e) {
- $con->rollBack();
- throw $e;
- }
- }
-
- /**
- * Performs the work of inserting or updating the row in the database.
- *
- * If the object is new, it inserts it; otherwise an update is performed.
- * All related objects are also updated in this method.
- *
- * @param ConnectionInterface $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
- * @see save()
- */
- protected function doSave(ConnectionInterface $con)
- {
- $affectedRows = 0; // initialize var to track total num of affected rows
- if (!$this->alreadyInSave) {
- $this->alreadyInSave = true;
-
- // We call the save method on the following object(s) if they
- // were passed to this object by their corresponding set
- // method. This object relates to these object(s) by a
- // foreign key reference.
-
- if ($this->aCoupon !== null) {
- if ($this->aCoupon->isModified() || $this->aCoupon->isNew()) {
- $affectedRows += $this->aCoupon->save($con);
- }
- $this->setCoupon($this->aCoupon);
- }
-
- if ($this->isNew() || $this->isModified()) {
- // persist changes
- if ($this->isNew()) {
- $this->doInsert($con);
- } else {
- $this->doUpdate($con);
- }
- $affectedRows += 1;
- $this->resetModified();
- }
-
- $this->alreadyInSave = false;
-
- }
-
- return $affectedRows;
- } // doSave()
-
- /**
- * Insert the row in the database.
- *
- * @param ConnectionInterface $con
- *
- * @throws PropelException
- * @see doSave()
- */
- protected function doInsert(ConnectionInterface $con)
- {
- $modifiedColumns = array();
- $index = 0;
-
- $this->modifiedColumns[] = CouponRuleTableMap::ID;
- if (null !== $this->id) {
- throw new PropelException('Cannot insert a value for auto-increment primary key (' . CouponRuleTableMap::ID . ')');
- }
-
- // check the columns in natural order for more readable SQL queries
- if ($this->isColumnModified(CouponRuleTableMap::ID)) {
- $modifiedColumns[':p' . $index++] = 'ID';
- }
- if ($this->isColumnModified(CouponRuleTableMap::COUPON_ID)) {
- $modifiedColumns[':p' . $index++] = 'COUPON_ID';
- }
- if ($this->isColumnModified(CouponRuleTableMap::CONTROLLER)) {
- $modifiedColumns[':p' . $index++] = 'CONTROLLER';
- }
- if ($this->isColumnModified(CouponRuleTableMap::OPERATION)) {
- $modifiedColumns[':p' . $index++] = 'OPERATION';
- }
- if ($this->isColumnModified(CouponRuleTableMap::VALUE)) {
- $modifiedColumns[':p' . $index++] = 'VALUE';
- }
- if ($this->isColumnModified(CouponRuleTableMap::CREATED_AT)) {
- $modifiedColumns[':p' . $index++] = 'CREATED_AT';
- }
- if ($this->isColumnModified(CouponRuleTableMap::UPDATED_AT)) {
- $modifiedColumns[':p' . $index++] = 'UPDATED_AT';
- }
-
- $sql = sprintf(
- 'INSERT INTO coupon_rule (%s) VALUES (%s)',
- implode(', ', $modifiedColumns),
- implode(', ', array_keys($modifiedColumns))
- );
-
- try {
- $stmt = $con->prepare($sql);
- foreach ($modifiedColumns as $identifier => $columnName) {
- switch ($columnName) {
- case 'ID':
- $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
- break;
- case 'COUPON_ID':
- $stmt->bindValue($identifier, $this->coupon_id, PDO::PARAM_INT);
- break;
- case 'CONTROLLER':
- $stmt->bindValue($identifier, $this->controller, PDO::PARAM_STR);
- break;
- case 'OPERATION':
- $stmt->bindValue($identifier, $this->operation, PDO::PARAM_STR);
- break;
- case 'VALUE':
- $stmt->bindValue($identifier, $this->value, 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;
- case 'UPDATED_AT':
- $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
- break;
- }
- }
- $stmt->execute();
- } catch (Exception $e) {
- Propel::log($e->getMessage(), Propel::LOG_ERR);
- throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e);
- }
-
- try {
- $pk = $con->lastInsertId();
- } catch (Exception $e) {
- throw new PropelException('Unable to get autoincrement id.', 0, $e);
- }
- $this->setId($pk);
-
- $this->setNew(false);
- }
-
- /**
- * Update the row in the database.
- *
- * @param ConnectionInterface $con
- *
- * @return Integer Number of updated rows
- * @see doSave()
- */
- protected function doUpdate(ConnectionInterface $con)
- {
- $selectCriteria = $this->buildPkeyCriteria();
- $valuesCriteria = $this->buildCriteria();
-
- return $selectCriteria->doUpdate($valuesCriteria, $con);
- }
-
- /**
- * Retrieves a field from the object by name passed in as a string.
- *
- * @param string $name name
- * @param string $type The type of fieldname the $name is of:
- * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
- * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
- * Defaults to TableMap::TYPE_PHPNAME.
- * @return mixed Value of field.
- */
- public function getByName($name, $type = TableMap::TYPE_PHPNAME)
- {
- $pos = CouponRuleTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
- $field = $this->getByPosition($pos);
-
- return $field;
- }
-
- /**
- * Retrieves a field from the object by Position as specified in the xml schema.
- * Zero-based.
- *
- * @param int $pos position in xml schema
- * @return mixed Value of field at $pos
- */
- public function getByPosition($pos)
- {
- switch ($pos) {
- case 0:
- return $this->getId();
- break;
- case 1:
- return $this->getCouponId();
- break;
- case 2:
- return $this->getController();
- break;
- case 3:
- return $this->getOperation();
- break;
- case 4:
- return $this->getValue();
- break;
- case 5:
- return $this->getCreatedAt();
- break;
- case 6:
- return $this->getUpdatedAt();
- break;
- default:
- return null;
- break;
- } // switch()
- }
-
- /**
- * Exports the object as an array.
- *
- * You can specify the key type of the array by passing one of the class
- * type constants.
- *
- * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME,
- * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
- * Defaults to TableMap::TYPE_PHPNAME.
- * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
- * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
- * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
- *
- * @return array an associative array containing the field names (as keys) and field values
- */
- public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
- {
- if (isset($alreadyDumpedObjects['CouponRule'][$this->getPrimaryKey()])) {
- return '*RECURSION*';
- }
- $alreadyDumpedObjects['CouponRule'][$this->getPrimaryKey()] = true;
- $keys = CouponRuleTableMap::getFieldNames($keyType);
- $result = array(
- $keys[0] => $this->getId(),
- $keys[1] => $this->getCouponId(),
- $keys[2] => $this->getController(),
- $keys[3] => $this->getOperation(),
- $keys[4] => $this->getValue(),
- $keys[5] => $this->getCreatedAt(),
- $keys[6] => $this->getUpdatedAt(),
- );
- $virtualColumns = $this->virtualColumns;
- foreach($virtualColumns as $key => $virtualColumn)
- {
- $result[$key] = $virtualColumn;
- }
-
- if ($includeForeignObjects) {
- if (null !== $this->aCoupon) {
- $result['Coupon'] = $this->aCoupon->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
- }
- }
-
- return $result;
- }
-
- /**
- * Sets a field from the object by name passed in as a string.
- *
- * @param string $name
- * @param mixed $value field value
- * @param string $type The type of fieldname the $name is of:
- * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
- * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
- * Defaults to TableMap::TYPE_PHPNAME.
- * @return void
- */
- public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
- {
- $pos = CouponRuleTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
-
- return $this->setByPosition($pos, $value);
- }
-
- /**
- * Sets a field from the object by Position as specified in the xml schema.
- * Zero-based.
- *
- * @param int $pos position in xml schema
- * @param mixed $value field value
- * @return void
- */
- public function setByPosition($pos, $value)
- {
- switch ($pos) {
- case 0:
- $this->setId($value);
- break;
- case 1:
- $this->setCouponId($value);
- break;
- case 2:
- $this->setController($value);
- break;
- case 3:
- $this->setOperation($value);
- break;
- case 4:
- $this->setValue($value);
- break;
- case 5:
- $this->setCreatedAt($value);
- break;
- case 6:
- $this->setUpdatedAt($value);
- break;
- } // switch()
- }
-
- /**
- * Populates the object using an array.
- *
- * This is particularly useful when populating an object from one of the
- * request arrays (e.g. $_POST). This method goes through the column
- * names, checking to see whether a matching key exists in populated
- * array. If so the setByName() method is called for that column.
- *
- * You can specify the key type of the array by additionally passing one
- * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME,
- * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
- * The default key type is the column's TableMap::TYPE_PHPNAME.
- *
- * @param array $arr An array to populate the object from.
- * @param string $keyType The type of keys the array uses.
- * @return void
- */
- public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
- {
- $keys = CouponRuleTableMap::getFieldNames($keyType);
-
- if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
- if (array_key_exists($keys[1], $arr)) $this->setCouponId($arr[$keys[1]]);
- if (array_key_exists($keys[2], $arr)) $this->setController($arr[$keys[2]]);
- if (array_key_exists($keys[3], $arr)) $this->setOperation($arr[$keys[3]]);
- if (array_key_exists($keys[4], $arr)) $this->setValue($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]]);
- }
-
- /**
- * Build a Criteria object containing the values of all modified columns in this object.
- *
- * @return Criteria The Criteria object containing all modified values.
- */
- public function buildCriteria()
- {
- $criteria = new Criteria(CouponRuleTableMap::DATABASE_NAME);
-
- if ($this->isColumnModified(CouponRuleTableMap::ID)) $criteria->add(CouponRuleTableMap::ID, $this->id);
- if ($this->isColumnModified(CouponRuleTableMap::COUPON_ID)) $criteria->add(CouponRuleTableMap::COUPON_ID, $this->coupon_id);
- if ($this->isColumnModified(CouponRuleTableMap::CONTROLLER)) $criteria->add(CouponRuleTableMap::CONTROLLER, $this->controller);
- if ($this->isColumnModified(CouponRuleTableMap::OPERATION)) $criteria->add(CouponRuleTableMap::OPERATION, $this->operation);
- if ($this->isColumnModified(CouponRuleTableMap::VALUE)) $criteria->add(CouponRuleTableMap::VALUE, $this->value);
- if ($this->isColumnModified(CouponRuleTableMap::CREATED_AT)) $criteria->add(CouponRuleTableMap::CREATED_AT, $this->created_at);
- if ($this->isColumnModified(CouponRuleTableMap::UPDATED_AT)) $criteria->add(CouponRuleTableMap::UPDATED_AT, $this->updated_at);
-
- return $criteria;
- }
-
- /**
- * Builds a Criteria object containing the primary key for this object.
- *
- * Unlike buildCriteria() this method includes the primary key values regardless
- * of whether or not they have been modified.
- *
- * @return Criteria The Criteria object containing value(s) for primary key(s).
- */
- public function buildPkeyCriteria()
- {
- $criteria = new Criteria(CouponRuleTableMap::DATABASE_NAME);
- $criteria->add(CouponRuleTableMap::ID, $this->id);
-
- return $criteria;
- }
-
- /**
- * Returns the primary key for this object (row).
- * @return int
- */
- public function getPrimaryKey()
- {
- return $this->getId();
- }
-
- /**
- * Generic method to set the primary key (id column).
- *
- * @param int $key Primary key.
- * @return void
- */
- public function setPrimaryKey($key)
- {
- $this->setId($key);
- }
-
- /**
- * Returns true if the primary key for this object is null.
- * @return boolean
- */
- public function isPrimaryKeyNull()
- {
-
- return null === $this->getId();
- }
-
- /**
- * Sets contents of passed object to values from current object.
- *
- * If desired, this method can also make copies of all associated (fkey referrers)
- * objects.
- *
- * @param object $copyObj An object of \Thelia\Model\CouponRule (or compatible) type.
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
- * @throws PropelException
- */
- public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
- {
- $copyObj->setCouponId($this->getCouponId());
- $copyObj->setController($this->getController());
- $copyObj->setOperation($this->getOperation());
- $copyObj->setValue($this->getValue());
- $copyObj->setCreatedAt($this->getCreatedAt());
- $copyObj->setUpdatedAt($this->getUpdatedAt());
- if ($makeNew) {
- $copyObj->setNew(true);
- $copyObj->setId(NULL); // this is a auto-increment column, so set to default value
- }
- }
-
- /**
- * Makes a copy of this object that will be inserted as a new row in table when saved.
- * It creates a new object filling in the simple attributes, but skipping any primary
- * keys that are defined for the table.
- *
- * If desired, this method can also make copies of all associated (fkey referrers)
- * objects.
- *
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @return \Thelia\Model\CouponRule Clone of current object.
- * @throws PropelException
- */
- public function copy($deepCopy = false)
- {
- // we use get_class(), because this might be a subclass
- $clazz = get_class($this);
- $copyObj = new $clazz();
- $this->copyInto($copyObj, $deepCopy);
-
- return $copyObj;
- }
-
- /**
- * Declares an association between this object and a ChildCoupon object.
- *
- * @param ChildCoupon $v
- * @return \Thelia\Model\CouponRule The current object (for fluent API support)
- * @throws PropelException
- */
- public function setCoupon(ChildCoupon $v = null)
- {
- if ($v === null) {
- $this->setCouponId(NULL);
- } else {
- $this->setCouponId($v->getId());
- }
-
- $this->aCoupon = $v;
-
- // Add binding for other direction of this n:n relationship.
- // If this object has already been added to the ChildCoupon object, it will not be re-added.
- if ($v !== null) {
- $v->addCouponRule($this);
- }
-
-
- return $this;
- }
-
-
- /**
- * Get the associated ChildCoupon object
- *
- * @param ConnectionInterface $con Optional Connection object.
- * @return ChildCoupon The associated ChildCoupon object.
- * @throws PropelException
- */
- public function getCoupon(ConnectionInterface $con = null)
- {
- if ($this->aCoupon === null && ($this->coupon_id !== null)) {
- $this->aCoupon = ChildCouponQuery::create()->findPk($this->coupon_id, $con);
- /* The following can be used additionally to
- guarantee the related object contains a reference
- to this object. This level of coupling may, however, be
- undesirable since it could result in an only partially populated collection
- in the referenced object.
- $this->aCoupon->addCouponRules($this);
- */
- }
-
- return $this->aCoupon;
- }
-
- /**
- * Clears the current object and sets all attributes to their default values
- */
- public function clear()
- {
- $this->id = null;
- $this->coupon_id = null;
- $this->controller = null;
- $this->operation = null;
- $this->value = null;
- $this->created_at = null;
- $this->updated_at = null;
- $this->alreadyInSave = false;
- $this->clearAllReferences();
- $this->resetModified();
- $this->setNew(true);
- $this->setDeleted(false);
- }
-
- /**
- * Resets all references to other model objects or collections of model objects.
- *
- * This method is a user-space workaround for PHP's inability to garbage collect
- * objects with circular references (even in PHP 5.3). This is currently necessary
- * when using Propel in certain daemon or large-volume/high-memory operations.
- *
- * @param boolean $deep Whether to also clear the references on all referrer objects.
- */
- public function clearAllReferences($deep = false)
- {
- if ($deep) {
- } // if ($deep)
-
- $this->aCoupon = null;
- }
-
- /**
- * Return the string representation of this object
- *
- * @return string
- */
- public function __toString()
- {
- return (string) $this->exportTo(CouponRuleTableMap::DEFAULT_STRING_FORMAT);
- }
-
- // timestampable behavior
-
- /**
- * Mark the current object so that the update date doesn't get updated during next save
- *
- * @return ChildCouponRule The current object (for fluent API support)
- */
- public function keepUpdateDateUnchanged()
- {
- $this->modifiedColumns[] = CouponRuleTableMap::UPDATED_AT;
-
- return $this;
- }
-
- /**
- * Code to be run before persisting the object
- * @param ConnectionInterface $con
- * @return boolean
- */
- public function preSave(ConnectionInterface $con = null)
- {
- return true;
- }
-
- /**
- * Code to be run after persisting the object
- * @param ConnectionInterface $con
- */
- public function postSave(ConnectionInterface $con = null)
- {
-
- }
-
- /**
- * Code to be run before inserting to database
- * @param ConnectionInterface $con
- * @return boolean
- */
- public function preInsert(ConnectionInterface $con = null)
- {
- return true;
- }
-
- /**
- * Code to be run after inserting to database
- * @param ConnectionInterface $con
- */
- public function postInsert(ConnectionInterface $con = null)
- {
-
- }
-
- /**
- * Code to be run before updating the object in database
- * @param ConnectionInterface $con
- * @return boolean
- */
- public function preUpdate(ConnectionInterface $con = null)
- {
- return true;
- }
-
- /**
- * Code to be run after updating the object in database
- * @param ConnectionInterface $con
- */
- public function postUpdate(ConnectionInterface $con = null)
- {
-
- }
-
- /**
- * Code to be run before deleting the object in database
- * @param ConnectionInterface $con
- * @return boolean
- */
- public function preDelete(ConnectionInterface $con = null)
- {
- return true;
- }
-
- /**
- * Code to be run after deleting the object in database
- * @param ConnectionInterface $con
- */
- public function postDelete(ConnectionInterface $con = null)
- {
-
- }
-
-
- /**
- * Derived method to catches calls to undefined methods.
- *
- * Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.).
- * Allows to define default __call() behavior if you overwrite __call()
- *
- * @param string $name
- * @param mixed $params
- *
- * @return array|string
- */
- public function __call($name, $params)
- {
- if (0 === strpos($name, 'get')) {
- $virtualColumn = substr($name, 3);
- if ($this->hasVirtualColumn($virtualColumn)) {
- return $this->getVirtualColumn($virtualColumn);
- }
-
- $virtualColumn = lcfirst($virtualColumn);
- if ($this->hasVirtualColumn($virtualColumn)) {
- return $this->getVirtualColumn($virtualColumn);
- }
- }
-
- if (0 === strpos($name, 'from')) {
- $format = substr($name, 4);
-
- return $this->importFrom($format, reset($params));
- }
-
- if (0 === strpos($name, 'to')) {
- $format = substr($name, 2);
- $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true;
-
- return $this->exportTo($format, $includeLazyLoadColumns);
- }
-
- throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name));
- }
-
-}
diff --git a/core/lib/Thelia/Model/Base/CouponRuleQuery.php b/core/lib/Thelia/Model/Base/CouponRuleQuery.php
deleted file mode 100755
index 0789f84d6..000000000
--- a/core/lib/Thelia/Model/Base/CouponRuleQuery.php
+++ /dev/null
@@ -1,744 +0,0 @@
-setModelAlias($modelAlias);
- }
- if ($criteria instanceof Criteria) {
- $query->mergeWith($criteria);
- }
-
- return $query;
- }
-
- /**
- * Find object by primary key.
- * Propel uses the instance pool to skip the database if the object exists.
- * Go fast if the query is untouched.
- *
- *
- * $obj = $c->findPk(12, $con);
- *
- *
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con an optional connection object
- *
- * @return ChildCouponRule|array|mixed the result, formatted by the current formatter
- */
- public function findPk($key, $con = null)
- {
- if ($key === null) {
- return null;
- }
- if ((null !== ($obj = CouponRuleTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
- // the object is already in the instance pool
- return $obj;
- }
- if ($con === null) {
- $con = Propel::getServiceContainer()->getReadConnection(CouponRuleTableMap::DATABASE_NAME);
- }
- $this->basePreSelect($con);
- if ($this->formatter || $this->modelAlias || $this->with || $this->select
- || $this->selectColumns || $this->asColumns || $this->selectModifiers
- || $this->map || $this->having || $this->joins) {
- return $this->findPkComplex($key, $con);
- } else {
- return $this->findPkSimple($key, $con);
- }
- }
-
- /**
- * Find object by primary key using raw SQL to go fast.
- * Bypass doSelect() and the object formatter by using generated code.
- *
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
- *
- * @return ChildCouponRule A model object, or null if the key is not found
- */
- protected function findPkSimple($key, $con)
- {
- $sql = 'SELECT ID, COUPON_ID, CONTROLLER, OPERATION, VALUE, CREATED_AT, UPDATED_AT FROM coupon_rule WHERE ID = :p0';
- try {
- $stmt = $con->prepare($sql);
- $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
- $stmt->execute();
- } catch (Exception $e) {
- Propel::log($e->getMessage(), Propel::LOG_ERR);
- throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);
- }
- $obj = null;
- if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
- $obj = new ChildCouponRule();
- $obj->hydrate($row);
- CouponRuleTableMap::addInstanceToPool($obj, (string) $key);
- }
- $stmt->closeCursor();
-
- return $obj;
- }
-
- /**
- * Find object by primary key.
- *
- * @param mixed $key Primary key to use for the query
- * @param ConnectionInterface $con A connection object
- *
- * @return ChildCouponRule|array|mixed the result, formatted by the current formatter
- */
- protected function findPkComplex($key, $con)
- {
- // As the query uses a PK condition, no limit(1) is necessary.
- $criteria = $this->isKeepQuery() ? clone $this : $this;
- $dataFetcher = $criteria
- ->filterByPrimaryKey($key)
- ->doSelect($con);
-
- return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
- }
-
- /**
- * Find objects by primary key
- *
- * $objs = $c->findPks(array(12, 56, 832), $con);
- *
- * @param array $keys Primary keys to use for the query
- * @param ConnectionInterface $con an optional connection object
- *
- * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
- */
- public function findPks($keys, $con = null)
- {
- if (null === $con) {
- $con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
- }
- $this->basePreSelect($con);
- $criteria = $this->isKeepQuery() ? clone $this : $this;
- $dataFetcher = $criteria
- ->filterByPrimaryKeys($keys)
- ->doSelect($con);
-
- return $criteria->getFormatter()->init($criteria)->format($dataFetcher);
- }
-
- /**
- * Filter the query by primary key
- *
- * @param mixed $key Primary key to use for the query
- *
- * @return ChildCouponRuleQuery The current query, for fluid interface
- */
- public function filterByPrimaryKey($key)
- {
-
- return $this->addUsingAlias(CouponRuleTableMap::ID, $key, Criteria::EQUAL);
- }
-
- /**
- * Filter the query by a list of primary keys
- *
- * @param array $keys The list of primary key to use for the query
- *
- * @return ChildCouponRuleQuery The current query, for fluid interface
- */
- public function filterByPrimaryKeys($keys)
- {
-
- return $this->addUsingAlias(CouponRuleTableMap::ID, $keys, Criteria::IN);
- }
-
- /**
- * Filter the query on the id column
- *
- * Example usage:
- *
- * $query->filterById(1234); // WHERE id = 1234
- * $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
- * $query->filterById(array('min' => 12)); // WHERE id > 12
- *
- *
- * @param mixed $id 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 ChildCouponRuleQuery The current query, for fluid interface
- */
- public function filterById($id = null, $comparison = null)
- {
- if (is_array($id)) {
- $useMinMax = false;
- if (isset($id['min'])) {
- $this->addUsingAlias(CouponRuleTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
- $useMinMax = true;
- }
- if (isset($id['max'])) {
- $this->addUsingAlias(CouponRuleTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
- $useMinMax = true;
- }
- if ($useMinMax) {
- return $this;
- }
- if (null === $comparison) {
- $comparison = Criteria::IN;
- }
- }
-
- return $this->addUsingAlias(CouponRuleTableMap::ID, $id, $comparison);
- }
-
- /**
- * Filter the query on the coupon_id column
- *
- * Example usage:
- *
- * $query->filterByCouponId(1234); // WHERE coupon_id = 1234
- * $query->filterByCouponId(array(12, 34)); // WHERE coupon_id IN (12, 34)
- * $query->filterByCouponId(array('min' => 12)); // WHERE coupon_id > 12
- *
- *
- * @see filterByCoupon()
- *
- * @param mixed $couponId 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 ChildCouponRuleQuery The current query, for fluid interface
- */
- public function filterByCouponId($couponId = null, $comparison = null)
- {
- if (is_array($couponId)) {
- $useMinMax = false;
- if (isset($couponId['min'])) {
- $this->addUsingAlias(CouponRuleTableMap::COUPON_ID, $couponId['min'], Criteria::GREATER_EQUAL);
- $useMinMax = true;
- }
- if (isset($couponId['max'])) {
- $this->addUsingAlias(CouponRuleTableMap::COUPON_ID, $couponId['max'], Criteria::LESS_EQUAL);
- $useMinMax = true;
- }
- if ($useMinMax) {
- return $this;
- }
- if (null === $comparison) {
- $comparison = Criteria::IN;
- }
- }
-
- return $this->addUsingAlias(CouponRuleTableMap::COUPON_ID, $couponId, $comparison);
- }
-
- /**
- * Filter the query on the controller column
- *
- * Example usage:
- *
- * $query->filterByController('fooValue'); // WHERE controller = 'fooValue'
- * $query->filterByController('%fooValue%'); // WHERE controller LIKE '%fooValue%'
- *
- *
- * @param string $controller 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 ChildCouponRuleQuery The current query, for fluid interface
- */
- public function filterByController($controller = null, $comparison = null)
- {
- if (null === $comparison) {
- if (is_array($controller)) {
- $comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $controller)) {
- $controller = str_replace('*', '%', $controller);
- $comparison = Criteria::LIKE;
- }
- }
-
- return $this->addUsingAlias(CouponRuleTableMap::CONTROLLER, $controller, $comparison);
- }
-
- /**
- * Filter the query on the operation column
- *
- * Example usage:
- *
- * $query->filterByOperation('fooValue'); // WHERE operation = 'fooValue'
- * $query->filterByOperation('%fooValue%'); // WHERE operation LIKE '%fooValue%'
- *
- *
- * @param string $operation 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 ChildCouponRuleQuery The current query, for fluid interface
- */
- public function filterByOperation($operation = null, $comparison = null)
- {
- if (null === $comparison) {
- if (is_array($operation)) {
- $comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $operation)) {
- $operation = str_replace('*', '%', $operation);
- $comparison = Criteria::LIKE;
- }
- }
-
- return $this->addUsingAlias(CouponRuleTableMap::OPERATION, $operation, $comparison);
- }
-
- /**
- * Filter the query on the value column
- *
- * Example usage:
- *
- * $query->filterByValue(1234); // WHERE value = 1234
- * $query->filterByValue(array(12, 34)); // WHERE value IN (12, 34)
- * $query->filterByValue(array('min' => 12)); // WHERE value > 12
- *
- *
- * @param mixed $value 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 ChildCouponRuleQuery The current query, for fluid interface
- */
- public function filterByValue($value = null, $comparison = null)
- {
- if (is_array($value)) {
- $useMinMax = false;
- if (isset($value['min'])) {
- $this->addUsingAlias(CouponRuleTableMap::VALUE, $value['min'], Criteria::GREATER_EQUAL);
- $useMinMax = true;
- }
- if (isset($value['max'])) {
- $this->addUsingAlias(CouponRuleTableMap::VALUE, $value['max'], Criteria::LESS_EQUAL);
- $useMinMax = true;
- }
- if ($useMinMax) {
- return $this;
- }
- if (null === $comparison) {
- $comparison = Criteria::IN;
- }
- }
-
- return $this->addUsingAlias(CouponRuleTableMap::VALUE, $value, $comparison);
- }
-
- /**
- * Filter the query on the created_at column
- *
- * Example usage:
- *
- * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14'
- * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14'
- * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'
- *
- *
- * @param mixed $createdAt 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 ChildCouponRuleQuery The current query, for fluid interface
- */
- public function filterByCreatedAt($createdAt = null, $comparison = null)
- {
- if (is_array($createdAt)) {
- $useMinMax = false;
- if (isset($createdAt['min'])) {
- $this->addUsingAlias(CouponRuleTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
- $useMinMax = true;
- }
- if (isset($createdAt['max'])) {
- $this->addUsingAlias(CouponRuleTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
- $useMinMax = true;
- }
- if ($useMinMax) {
- return $this;
- }
- if (null === $comparison) {
- $comparison = Criteria::IN;
- }
- }
-
- return $this->addUsingAlias(CouponRuleTableMap::CREATED_AT, $createdAt, $comparison);
- }
-
- /**
- * Filter the query on the updated_at column
- *
- * Example usage:
- *
- * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14'
- * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14'
- * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'
- *
- *
- * @param mixed $updatedAt 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 ChildCouponRuleQuery The current query, for fluid interface
- */
- public function filterByUpdatedAt($updatedAt = null, $comparison = null)
- {
- if (is_array($updatedAt)) {
- $useMinMax = false;
- if (isset($updatedAt['min'])) {
- $this->addUsingAlias(CouponRuleTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
- $useMinMax = true;
- }
- if (isset($updatedAt['max'])) {
- $this->addUsingAlias(CouponRuleTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
- $useMinMax = true;
- }
- if ($useMinMax) {
- return $this;
- }
- if (null === $comparison) {
- $comparison = Criteria::IN;
- }
- }
-
- return $this->addUsingAlias(CouponRuleTableMap::UPDATED_AT, $updatedAt, $comparison);
- }
-
- /**
- * Filter the query by a related \Thelia\Model\Coupon object
- *
- * @param \Thelia\Model\Coupon|ObjectCollection $coupon The related object(s) to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
- *
- * @return ChildCouponRuleQuery The current query, for fluid interface
- */
- public function filterByCoupon($coupon, $comparison = null)
- {
- if ($coupon instanceof \Thelia\Model\Coupon) {
- return $this
- ->addUsingAlias(CouponRuleTableMap::COUPON_ID, $coupon->getId(), $comparison);
- } elseif ($coupon instanceof ObjectCollection) {
- if (null === $comparison) {
- $comparison = Criteria::IN;
- }
-
- return $this
- ->addUsingAlias(CouponRuleTableMap::COUPON_ID, $coupon->toKeyValue('PrimaryKey', 'Id'), $comparison);
- } else {
- throw new PropelException('filterByCoupon() only accepts arguments of type \Thelia\Model\Coupon or Collection');
- }
- }
-
- /**
- * Adds a JOIN clause to the query using the Coupon relation
- *
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
- *
- * @return ChildCouponRuleQuery The current query, for fluid interface
- */
- public function joinCoupon($relationAlias = null, $joinType = Criteria::INNER_JOIN)
- {
- $tableMap = $this->getTableMap();
- $relationMap = $tableMap->getRelation('Coupon');
-
- // create a ModelJoin object for this join
- $join = new ModelJoin();
- $join->setJoinType($joinType);
- $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
- if ($previousJoin = $this->getPreviousJoin()) {
- $join->setPreviousJoin($previousJoin);
- }
-
- // add the ModelJoin to the current object
- if ($relationAlias) {
- $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
- $this->addJoinObject($join, $relationAlias);
- } else {
- $this->addJoinObject($join, 'Coupon');
- }
-
- return $this;
- }
-
- /**
- * Use the Coupon relation Coupon object
- *
- * @see useQuery()
- *
- * @param string $relationAlias optional alias for the relation,
- * to be used as main alias in the secondary query
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
- *
- * @return \Thelia\Model\CouponQuery A secondary query class using the current class as primary query
- */
- public function useCouponQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
- {
- return $this
- ->joinCoupon($relationAlias, $joinType)
- ->useQuery($relationAlias ? $relationAlias : 'Coupon', '\Thelia\Model\CouponQuery');
- }
-
- /**
- * Exclude object from result
- *
- * @param ChildCouponRule $couponRule Object to remove from the list of results
- *
- * @return ChildCouponRuleQuery The current query, for fluid interface
- */
- public function prune($couponRule = null)
- {
- if ($couponRule) {
- $this->addUsingAlias(CouponRuleTableMap::ID, $couponRule->getId(), Criteria::NOT_EQUAL);
- }
-
- return $this;
- }
-
- /**
- * Deletes all rows from the coupon_rule table.
- *
- * @param ConnectionInterface $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver).
- */
- public function doDeleteAll(ConnectionInterface $con = null)
- {
- if (null === $con) {
- $con = Propel::getServiceContainer()->getWriteConnection(CouponRuleTableMap::DATABASE_NAME);
- }
- $affectedRows = 0; // initialize var to track total num of affected rows
- try {
- // use transaction because $criteria could contain info
- // for more than one table or we could emulating ON DELETE CASCADE, etc.
- $con->beginTransaction();
- $affectedRows += parent::doDeleteAll($con);
- // Because this db requires some delete cascade/set null emulation, we have to
- // clear the cached instance *after* the emulation has happened (since
- // instances get re-added by the select statement contained therein).
- CouponRuleTableMap::clearInstancePool();
- CouponRuleTableMap::clearRelatedInstancePool();
-
- $con->commit();
- } catch (PropelException $e) {
- $con->rollBack();
- throw $e;
- }
-
- return $affectedRows;
- }
-
- /**
- * Performs a DELETE on the database, given a ChildCouponRule or Criteria object OR a primary key value.
- *
- * @param mixed $values Criteria or ChildCouponRule object or primary key or array of primary keys
- * which is used to create the DELETE statement
- * @param ConnectionInterface $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
- * if supported by native driver or if emulated using Propel.
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
- */
- public function delete(ConnectionInterface $con = null)
- {
- if (null === $con) {
- $con = Propel::getServiceContainer()->getWriteConnection(CouponRuleTableMap::DATABASE_NAME);
- }
-
- $criteria = $this;
-
- // Set the correct dbName
- $criteria->setDbName(CouponRuleTableMap::DATABASE_NAME);
-
- $affectedRows = 0; // initialize var to track total num of affected rows
-
- try {
- // use transaction because $criteria could contain info
- // for more than one table or we could emulating ON DELETE CASCADE, etc.
- $con->beginTransaction();
-
-
- CouponRuleTableMap::removeInstanceFromPool($criteria);
-
- $affectedRows += ModelCriteria::delete($con);
- CouponRuleTableMap::clearRelatedInstancePool();
- $con->commit();
-
- return $affectedRows;
- } catch (PropelException $e) {
- $con->rollBack();
- throw $e;
- }
- }
-
- // timestampable behavior
-
- /**
- * Filter by the latest updated
- *
- * @param int $nbDays Maximum age of the latest update in days
- *
- * @return ChildCouponRuleQuery The current query, for fluid interface
- */
- public function recentlyUpdated($nbDays = 7)
- {
- return $this->addUsingAlias(CouponRuleTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
- }
-
- /**
- * Filter by the latest created
- *
- * @param int $nbDays Maximum age of in days
- *
- * @return ChildCouponRuleQuery The current query, for fluid interface
- */
- public function recentlyCreated($nbDays = 7)
- {
- return $this->addUsingAlias(CouponRuleTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
- }
-
- /**
- * Order by update date desc
- *
- * @return ChildCouponRuleQuery The current query, for fluid interface
- */
- public function lastUpdatedFirst()
- {
- return $this->addDescendingOrderByColumn(CouponRuleTableMap::UPDATED_AT);
- }
-
- /**
- * Order by update date asc
- *
- * @return ChildCouponRuleQuery The current query, for fluid interface
- */
- public function firstUpdatedFirst()
- {
- return $this->addAscendingOrderByColumn(CouponRuleTableMap::UPDATED_AT);
- }
-
- /**
- * Order by create date desc
- *
- * @return ChildCouponRuleQuery The current query, for fluid interface
- */
- public function lastCreatedFirst()
- {
- return $this->addDescendingOrderByColumn(CouponRuleTableMap::CREATED_AT);
- }
-
- /**
- * Order by create date asc
- *
- * @return ChildCouponRuleQuery The current query, for fluid interface
- */
- public function firstCreatedFirst()
- {
- return $this->addAscendingOrderByColumn(CouponRuleTableMap::CREATED_AT);
- }
-
-} // CouponRuleQuery
diff --git a/core/lib/Thelia/Model/Base/CouponVersion.php b/core/lib/Thelia/Model/Base/CouponVersion.php
index 9952d80bc..efa4898f4 100644
--- a/core/lib/Thelia/Model/Base/CouponVersion.php
+++ b/core/lib/Thelia/Model/Base/CouponVersion.php
@@ -73,24 +73,6 @@ abstract class CouponVersion implements ActiveRecordInterface
*/
protected $type;
- /**
- * The value for the title field.
- * @var string
- */
- protected $title;
-
- /**
- * The value for the short_description field.
- * @var string
- */
- protected $short_description;
-
- /**
- * The value for the description field.
- * @var string
- */
- protected $description;
-
/**
* The value for the amount field.
* @var double
@@ -346,7 +328,7 @@ abstract class CouponVersion implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -477,39 +459,6 @@ abstract class CouponVersion implements ActiveRecordInterface
return $this->type;
}
- /**
- * Get the [title] column value.
- *
- * @return string
- */
- public function getTitle()
- {
-
- return $this->title;
- }
-
- /**
- * Get the [short_description] column value.
- *
- * @return string
- */
- public function getShortDescription()
- {
-
- return $this->short_description;
- }
-
- /**
- * Get the [description] column value.
- *
- * @return string
- */
- public function getDescription()
- {
-
- return $this->description;
- }
-
/**
* Get the [amount] column value.
*
@@ -736,69 +685,6 @@ abstract class CouponVersion implements ActiveRecordInterface
return $this;
} // setType()
- /**
- * Set the value of [title] column.
- *
- * @param string $v new value
- * @return \Thelia\Model\CouponVersion The current object (for fluent API support)
- */
- public function setTitle($v)
- {
- if ($v !== null) {
- $v = (string) $v;
- }
-
- if ($this->title !== $v) {
- $this->title = $v;
- $this->modifiedColumns[] = CouponVersionTableMap::TITLE;
- }
-
-
- return $this;
- } // setTitle()
-
- /**
- * Set the value of [short_description] column.
- *
- * @param string $v new value
- * @return \Thelia\Model\CouponVersion The current object (for fluent API support)
- */
- public function setShortDescription($v)
- {
- if ($v !== null) {
- $v = (string) $v;
- }
-
- if ($this->short_description !== $v) {
- $this->short_description = $v;
- $this->modifiedColumns[] = CouponVersionTableMap::SHORT_DESCRIPTION;
- }
-
-
- return $this;
- } // setShortDescription()
-
- /**
- * Set the value of [description] column.
- *
- * @param string $v new value
- * @return \Thelia\Model\CouponVersion The current object (for fluent API support)
- */
- public function setDescription($v)
- {
- if ($v !== null) {
- $v = (string) $v;
- }
-
- if ($this->description !== $v) {
- $this->description = $v;
- $this->modifiedColumns[] = CouponVersionTableMap::DESCRIPTION;
- }
-
-
- return $this;
- } // setDescription()
-
/**
* Set the value of [amount] column.
*
@@ -1109,58 +995,49 @@ abstract class CouponVersion implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CouponVersionTableMap::translateFieldName('Type', TableMap::TYPE_PHPNAME, $indexType)];
$this->type = (null !== $col) ? (string) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CouponVersionTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
- $this->title = (null !== $col) ? (string) $col : null;
-
- $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CouponVersionTableMap::translateFieldName('ShortDescription', TableMap::TYPE_PHPNAME, $indexType)];
- $this->short_description = (null !== $col) ? (string) $col : null;
-
- $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CouponVersionTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
- $this->description = (null !== $col) ? (string) $col : null;
-
- $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CouponVersionTableMap::translateFieldName('Amount', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CouponVersionTableMap::translateFieldName('Amount', TableMap::TYPE_PHPNAME, $indexType)];
$this->amount = (null !== $col) ? (double) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CouponVersionTableMap::translateFieldName('IsUsed', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CouponVersionTableMap::translateFieldName('IsUsed', TableMap::TYPE_PHPNAME, $indexType)];
$this->is_used = (null !== $col) ? (int) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CouponVersionTableMap::translateFieldName('IsEnabled', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CouponVersionTableMap::translateFieldName('IsEnabled', TableMap::TYPE_PHPNAME, $indexType)];
$this->is_enabled = (null !== $col) ? (int) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CouponVersionTableMap::translateFieldName('ExpirationDate', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CouponVersionTableMap::translateFieldName('ExpirationDate', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
$this->expiration_date = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : CouponVersionTableMap::translateFieldName('SerializedRules', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CouponVersionTableMap::translateFieldName('SerializedRules', TableMap::TYPE_PHPNAME, $indexType)];
$this->serialized_rules = (null !== $col) ? (string) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : CouponVersionTableMap::translateFieldName('IsCumulative', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CouponVersionTableMap::translateFieldName('IsCumulative', TableMap::TYPE_PHPNAME, $indexType)];
$this->is_cumulative = (null !== $col) ? (int) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : CouponVersionTableMap::translateFieldName('IsRemovingPostage', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CouponVersionTableMap::translateFieldName('IsRemovingPostage', TableMap::TYPE_PHPNAME, $indexType)];
$this->is_removing_postage = (null !== $col) ? (int) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CouponVersionTableMap::translateFieldName('MaxUsage', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : CouponVersionTableMap::translateFieldName('MaxUsage', TableMap::TYPE_PHPNAME, $indexType)];
$this->max_usage = (null !== $col) ? (int) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CouponVersionTableMap::translateFieldName('IsAvailableOnSpecialOffers', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : CouponVersionTableMap::translateFieldName('IsAvailableOnSpecialOffers', TableMap::TYPE_PHPNAME, $indexType)];
$this->is_available_on_special_offers = (null !== $col) ? (boolean) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : CouponVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : CouponVersionTableMap::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 ? 16 + $startcol : CouponVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CouponVersionTableMap::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 ? 17 + $startcol : CouponVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CouponVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
$this->version = (null !== $col) ? (int) $col : null;
$this->resetModified();
@@ -1170,7 +1047,7 @@ abstract class CouponVersion implements ActiveRecordInterface
$this->ensureConsistency();
}
- return $startcol + 18; // 18 = CouponVersionTableMap::NUM_HYDRATE_COLUMNS.
+ return $startcol + 15; // 15 = CouponVersionTableMap::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating \Thelia\Model\CouponVersion object", 0, $e);
@@ -1400,15 +1277,6 @@ abstract class CouponVersion implements ActiveRecordInterface
if ($this->isColumnModified(CouponVersionTableMap::TYPE)) {
$modifiedColumns[':p' . $index++] = 'TYPE';
}
- if ($this->isColumnModified(CouponVersionTableMap::TITLE)) {
- $modifiedColumns[':p' . $index++] = 'TITLE';
- }
- if ($this->isColumnModified(CouponVersionTableMap::SHORT_DESCRIPTION)) {
- $modifiedColumns[':p' . $index++] = 'SHORT_DESCRIPTION';
- }
- if ($this->isColumnModified(CouponVersionTableMap::DESCRIPTION)) {
- $modifiedColumns[':p' . $index++] = 'DESCRIPTION';
- }
if ($this->isColumnModified(CouponVersionTableMap::AMOUNT)) {
$modifiedColumns[':p' . $index++] = 'AMOUNT';
}
@@ -1465,15 +1333,6 @@ abstract class CouponVersion implements ActiveRecordInterface
case 'TYPE':
$stmt->bindValue($identifier, $this->type, PDO::PARAM_STR);
break;
- case 'TITLE':
- $stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
- break;
- case 'SHORT_DESCRIPTION':
- $stmt->bindValue($identifier, $this->short_description, PDO::PARAM_STR);
- break;
- case 'DESCRIPTION':
- $stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
- break;
case 'AMOUNT':
$stmt->bindValue($identifier, $this->amount, PDO::PARAM_STR);
break;
@@ -1575,48 +1434,39 @@ abstract class CouponVersion implements ActiveRecordInterface
return $this->getType();
break;
case 3:
- return $this->getTitle();
- break;
- case 4:
- return $this->getShortDescription();
- break;
- case 5:
- return $this->getDescription();
- break;
- case 6:
return $this->getAmount();
break;
- case 7:
+ case 4:
return $this->getIsUsed();
break;
- case 8:
+ case 5:
return $this->getIsEnabled();
break;
- case 9:
+ case 6:
return $this->getExpirationDate();
break;
- case 10:
+ case 7:
return $this->getSerializedRules();
break;
- case 11:
+ case 8:
return $this->getIsCumulative();
break;
- case 12:
+ case 9:
return $this->getIsRemovingPostage();
break;
- case 13:
+ case 10:
return $this->getMaxUsage();
break;
- case 14:
+ case 11:
return $this->getIsAvailableOnSpecialOffers();
break;
- case 15:
+ case 12:
return $this->getCreatedAt();
break;
- case 16:
+ case 13:
return $this->getUpdatedAt();
break;
- case 17:
+ case 14:
return $this->getVersion();
break;
default:
@@ -1651,21 +1501,18 @@ abstract class CouponVersion implements ActiveRecordInterface
$keys[0] => $this->getId(),
$keys[1] => $this->getCode(),
$keys[2] => $this->getType(),
- $keys[3] => $this->getTitle(),
- $keys[4] => $this->getShortDescription(),
- $keys[5] => $this->getDescription(),
- $keys[6] => $this->getAmount(),
- $keys[7] => $this->getIsUsed(),
- $keys[8] => $this->getIsEnabled(),
- $keys[9] => $this->getExpirationDate(),
- $keys[10] => $this->getSerializedRules(),
- $keys[11] => $this->getIsCumulative(),
- $keys[12] => $this->getIsRemovingPostage(),
- $keys[13] => $this->getMaxUsage(),
- $keys[14] => $this->getIsAvailableOnSpecialOffers(),
- $keys[15] => $this->getCreatedAt(),
- $keys[16] => $this->getUpdatedAt(),
- $keys[17] => $this->getVersion(),
+ $keys[3] => $this->getAmount(),
+ $keys[4] => $this->getIsUsed(),
+ $keys[5] => $this->getIsEnabled(),
+ $keys[6] => $this->getExpirationDate(),
+ $keys[7] => $this->getSerializedRules(),
+ $keys[8] => $this->getIsCumulative(),
+ $keys[9] => $this->getIsRemovingPostage(),
+ $keys[10] => $this->getMaxUsage(),
+ $keys[11] => $this->getIsAvailableOnSpecialOffers(),
+ $keys[12] => $this->getCreatedAt(),
+ $keys[13] => $this->getUpdatedAt(),
+ $keys[14] => $this->getVersion(),
);
$virtualColumns = $this->virtualColumns;
foreach($virtualColumns as $key => $virtualColumn)
@@ -1721,48 +1568,39 @@ abstract class CouponVersion implements ActiveRecordInterface
$this->setType($value);
break;
case 3:
- $this->setTitle($value);
- break;
- case 4:
- $this->setShortDescription($value);
- break;
- case 5:
- $this->setDescription($value);
- break;
- case 6:
$this->setAmount($value);
break;
- case 7:
+ case 4:
$this->setIsUsed($value);
break;
- case 8:
+ case 5:
$this->setIsEnabled($value);
break;
- case 9:
+ case 6:
$this->setExpirationDate($value);
break;
- case 10:
+ case 7:
$this->setSerializedRules($value);
break;
- case 11:
+ case 8:
$this->setIsCumulative($value);
break;
- case 12:
+ case 9:
$this->setIsRemovingPostage($value);
break;
- case 13:
+ case 10:
$this->setMaxUsage($value);
break;
- case 14:
+ case 11:
$this->setIsAvailableOnSpecialOffers($value);
break;
- case 15:
+ case 12:
$this->setCreatedAt($value);
break;
- case 16:
+ case 13:
$this->setUpdatedAt($value);
break;
- case 17:
+ case 14:
$this->setVersion($value);
break;
} // switch()
@@ -1792,21 +1630,18 @@ abstract class CouponVersion implements ActiveRecordInterface
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setCode($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setType($arr[$keys[2]]);
- if (array_key_exists($keys[3], $arr)) $this->setTitle($arr[$keys[3]]);
- if (array_key_exists($keys[4], $arr)) $this->setShortDescription($arr[$keys[4]]);
- if (array_key_exists($keys[5], $arr)) $this->setDescription($arr[$keys[5]]);
- if (array_key_exists($keys[6], $arr)) $this->setAmount($arr[$keys[6]]);
- if (array_key_exists($keys[7], $arr)) $this->setIsUsed($arr[$keys[7]]);
- if (array_key_exists($keys[8], $arr)) $this->setIsEnabled($arr[$keys[8]]);
- if (array_key_exists($keys[9], $arr)) $this->setExpirationDate($arr[$keys[9]]);
- if (array_key_exists($keys[10], $arr)) $this->setSerializedRules($arr[$keys[10]]);
- if (array_key_exists($keys[11], $arr)) $this->setIsCumulative($arr[$keys[11]]);
- if (array_key_exists($keys[12], $arr)) $this->setIsRemovingPostage($arr[$keys[12]]);
- if (array_key_exists($keys[13], $arr)) $this->setMaxUsage($arr[$keys[13]]);
- if (array_key_exists($keys[14], $arr)) $this->setIsAvailableOnSpecialOffers($arr[$keys[14]]);
- if (array_key_exists($keys[15], $arr)) $this->setCreatedAt($arr[$keys[15]]);
- if (array_key_exists($keys[16], $arr)) $this->setUpdatedAt($arr[$keys[16]]);
- if (array_key_exists($keys[17], $arr)) $this->setVersion($arr[$keys[17]]);
+ if (array_key_exists($keys[3], $arr)) $this->setAmount($arr[$keys[3]]);
+ if (array_key_exists($keys[4], $arr)) $this->setIsUsed($arr[$keys[4]]);
+ if (array_key_exists($keys[5], $arr)) $this->setIsEnabled($arr[$keys[5]]);
+ if (array_key_exists($keys[6], $arr)) $this->setExpirationDate($arr[$keys[6]]);
+ if (array_key_exists($keys[7], $arr)) $this->setSerializedRules($arr[$keys[7]]);
+ if (array_key_exists($keys[8], $arr)) $this->setIsCumulative($arr[$keys[8]]);
+ if (array_key_exists($keys[9], $arr)) $this->setIsRemovingPostage($arr[$keys[9]]);
+ if (array_key_exists($keys[10], $arr)) $this->setMaxUsage($arr[$keys[10]]);
+ if (array_key_exists($keys[11], $arr)) $this->setIsAvailableOnSpecialOffers($arr[$keys[11]]);
+ if (array_key_exists($keys[12], $arr)) $this->setCreatedAt($arr[$keys[12]]);
+ if (array_key_exists($keys[13], $arr)) $this->setUpdatedAt($arr[$keys[13]]);
+ if (array_key_exists($keys[14], $arr)) $this->setVersion($arr[$keys[14]]);
}
/**
@@ -1821,9 +1656,6 @@ abstract class CouponVersion implements ActiveRecordInterface
if ($this->isColumnModified(CouponVersionTableMap::ID)) $criteria->add(CouponVersionTableMap::ID, $this->id);
if ($this->isColumnModified(CouponVersionTableMap::CODE)) $criteria->add(CouponVersionTableMap::CODE, $this->code);
if ($this->isColumnModified(CouponVersionTableMap::TYPE)) $criteria->add(CouponVersionTableMap::TYPE, $this->type);
- if ($this->isColumnModified(CouponVersionTableMap::TITLE)) $criteria->add(CouponVersionTableMap::TITLE, $this->title);
- if ($this->isColumnModified(CouponVersionTableMap::SHORT_DESCRIPTION)) $criteria->add(CouponVersionTableMap::SHORT_DESCRIPTION, $this->short_description);
- if ($this->isColumnModified(CouponVersionTableMap::DESCRIPTION)) $criteria->add(CouponVersionTableMap::DESCRIPTION, $this->description);
if ($this->isColumnModified(CouponVersionTableMap::AMOUNT)) $criteria->add(CouponVersionTableMap::AMOUNT, $this->amount);
if ($this->isColumnModified(CouponVersionTableMap::IS_USED)) $criteria->add(CouponVersionTableMap::IS_USED, $this->is_used);
if ($this->isColumnModified(CouponVersionTableMap::IS_ENABLED)) $criteria->add(CouponVersionTableMap::IS_ENABLED, $this->is_enabled);
@@ -1909,9 +1741,6 @@ abstract class CouponVersion implements ActiveRecordInterface
$copyObj->setId($this->getId());
$copyObj->setCode($this->getCode());
$copyObj->setType($this->getType());
- $copyObj->setTitle($this->getTitle());
- $copyObj->setShortDescription($this->getShortDescription());
- $copyObj->setDescription($this->getDescription());
$copyObj->setAmount($this->getAmount());
$copyObj->setIsUsed($this->getIsUsed());
$copyObj->setIsEnabled($this->getIsEnabled());
@@ -2010,9 +1839,6 @@ abstract class CouponVersion implements ActiveRecordInterface
$this->id = null;
$this->code = null;
$this->type = null;
- $this->title = null;
- $this->short_description = null;
- $this->description = null;
$this->amount = null;
$this->is_used = null;
$this->is_enabled = null;
diff --git a/core/lib/Thelia/Model/Base/CouponVersionQuery.php b/core/lib/Thelia/Model/Base/CouponVersionQuery.php
index 71ce72aee..ed7e587e7 100644
--- a/core/lib/Thelia/Model/Base/CouponVersionQuery.php
+++ b/core/lib/Thelia/Model/Base/CouponVersionQuery.php
@@ -24,9 +24,6 @@ use Thelia\Model\Map\CouponVersionTableMap;
* @method ChildCouponVersionQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildCouponVersionQuery orderByCode($order = Criteria::ASC) Order by the code column
* @method ChildCouponVersionQuery orderByType($order = Criteria::ASC) Order by the type column
- * @method ChildCouponVersionQuery orderByTitle($order = Criteria::ASC) Order by the title column
- * @method ChildCouponVersionQuery orderByShortDescription($order = Criteria::ASC) Order by the short_description column
- * @method ChildCouponVersionQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method ChildCouponVersionQuery orderByAmount($order = Criteria::ASC) Order by the amount column
* @method ChildCouponVersionQuery orderByIsUsed($order = Criteria::ASC) Order by the is_used column
* @method ChildCouponVersionQuery orderByIsEnabled($order = Criteria::ASC) Order by the is_enabled column
@@ -43,9 +40,6 @@ use Thelia\Model\Map\CouponVersionTableMap;
* @method ChildCouponVersionQuery groupById() Group by the id column
* @method ChildCouponVersionQuery groupByCode() Group by the code column
* @method ChildCouponVersionQuery groupByType() Group by the type column
- * @method ChildCouponVersionQuery groupByTitle() Group by the title column
- * @method ChildCouponVersionQuery groupByShortDescription() Group by the short_description column
- * @method ChildCouponVersionQuery groupByDescription() Group by the description column
* @method ChildCouponVersionQuery groupByAmount() Group by the amount column
* @method ChildCouponVersionQuery groupByIsUsed() Group by the is_used column
* @method ChildCouponVersionQuery groupByIsEnabled() Group by the is_enabled column
@@ -73,9 +67,6 @@ use Thelia\Model\Map\CouponVersionTableMap;
* @method ChildCouponVersion findOneById(int $id) Return the first ChildCouponVersion filtered by the id column
* @method ChildCouponVersion findOneByCode(string $code) Return the first ChildCouponVersion filtered by the code column
* @method ChildCouponVersion findOneByType(string $type) Return the first ChildCouponVersion filtered by the type column
- * @method ChildCouponVersion findOneByTitle(string $title) Return the first ChildCouponVersion filtered by the title column
- * @method ChildCouponVersion findOneByShortDescription(string $short_description) Return the first ChildCouponVersion filtered by the short_description column
- * @method ChildCouponVersion findOneByDescription(string $description) Return the first ChildCouponVersion filtered by the description column
* @method ChildCouponVersion findOneByAmount(double $amount) Return the first ChildCouponVersion filtered by the amount column
* @method ChildCouponVersion findOneByIsUsed(int $is_used) Return the first ChildCouponVersion filtered by the is_used column
* @method ChildCouponVersion findOneByIsEnabled(int $is_enabled) Return the first ChildCouponVersion filtered by the is_enabled column
@@ -92,9 +83,6 @@ use Thelia\Model\Map\CouponVersionTableMap;
* @method array findById(int $id) Return ChildCouponVersion objects filtered by the id column
* @method array findByCode(string $code) Return ChildCouponVersion objects filtered by the code column
* @method array findByType(string $type) Return ChildCouponVersion objects filtered by the type column
- * @method array findByTitle(string $title) Return ChildCouponVersion objects filtered by the title column
- * @method array findByShortDescription(string $short_description) Return ChildCouponVersion objects filtered by the short_description column
- * @method array findByDescription(string $description) Return ChildCouponVersion objects filtered by the description column
* @method array findByAmount(double $amount) Return ChildCouponVersion objects filtered by the amount column
* @method array findByIsUsed(int $is_used) Return ChildCouponVersion objects filtered by the is_used column
* @method array findByIsEnabled(int $is_enabled) Return ChildCouponVersion objects filtered by the is_enabled column
@@ -195,7 +183,7 @@ abstract class CouponVersionQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
- $sql = 'SELECT ID, CODE, TYPE, TITLE, SHORT_DESCRIPTION, DESCRIPTION, AMOUNT, IS_USED, IS_ENABLED, EXPIRATION_DATE, SERIALIZED_RULES, IS_CUMULATIVE, IS_REMOVING_POSTAGE, MAX_USAGE, IS_AVAILABLE_ON_SPECIAL_OFFERS, CREATED_AT, UPDATED_AT, VERSION FROM coupon_version WHERE ID = :p0 AND VERSION = :p1';
+ $sql = 'SELECT ID, CODE, TYPE, AMOUNT, IS_USED, IS_ENABLED, EXPIRATION_DATE, SERIALIZED_RULES, IS_CUMULATIVE, IS_REMOVING_POSTAGE, MAX_USAGE, IS_AVAILABLE_ON_SPECIAL_OFFERS, CREATED_AT, UPDATED_AT, VERSION FROM coupon_version WHERE ID = :p0 AND VERSION = :p1';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
@@ -397,93 +385,6 @@ abstract class CouponVersionQuery extends ModelCriteria
return $this->addUsingAlias(CouponVersionTableMap::TYPE, $type, $comparison);
}
- /**
- * Filter the query on the title column
- *
- * Example usage:
- *
- * $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
- * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
- *
- *
- * @param string $title 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 ChildCouponVersionQuery The current query, for fluid interface
- */
- public function filterByTitle($title = null, $comparison = null)
- {
- if (null === $comparison) {
- if (is_array($title)) {
- $comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $title)) {
- $title = str_replace('*', '%', $title);
- $comparison = Criteria::LIKE;
- }
- }
-
- return $this->addUsingAlias(CouponVersionTableMap::TITLE, $title, $comparison);
- }
-
- /**
- * Filter the query on the short_description column
- *
- * Example usage:
- *
- * $query->filterByShortDescription('fooValue'); // WHERE short_description = 'fooValue'
- * $query->filterByShortDescription('%fooValue%'); // WHERE short_description LIKE '%fooValue%'
- *
- *
- * @param string $shortDescription 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 ChildCouponVersionQuery The current query, for fluid interface
- */
- public function filterByShortDescription($shortDescription = null, $comparison = null)
- {
- if (null === $comparison) {
- if (is_array($shortDescription)) {
- $comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $shortDescription)) {
- $shortDescription = str_replace('*', '%', $shortDescription);
- $comparison = Criteria::LIKE;
- }
- }
-
- return $this->addUsingAlias(CouponVersionTableMap::SHORT_DESCRIPTION, $shortDescription, $comparison);
- }
-
- /**
- * Filter the query on the description column
- *
- * Example usage:
- *
- * $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
- * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
- *
- *
- * @param string $description 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 ChildCouponVersionQuery The current query, for fluid interface
- */
- public function filterByDescription($description = null, $comparison = null)
- {
- if (null === $comparison) {
- if (is_array($description)) {
- $comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $description)) {
- $description = str_replace('*', '%', $description);
- $comparison = Criteria::LIKE;
- }
- }
-
- return $this->addUsingAlias(CouponVersionTableMap::DESCRIPTION, $description, $comparison);
- }
-
/**
* Filter the query on the amount column
*
diff --git a/core/lib/Thelia/Model/Base/Currency.php b/core/lib/Thelia/Model/Base/Currency.php
old mode 100755
new mode 100644
index a5ada0790..767e2dc37
--- a/core/lib/Thelia/Model/Base/Currency.php
+++ b/core/lib/Thelia/Model/Base/Currency.php
@@ -149,7 +149,7 @@ abstract class Currency implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -337,7 +337,7 @@ abstract class Currency implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -2681,7 +2681,7 @@ abstract class Currency implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collOrders instanceof Collection) {
@@ -2735,7 +2735,7 @@ abstract class Currency implements ActiveRecordInterface
*
* @return ChildCurrency The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -2759,7 +2759,7 @@ abstract class Currency implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildCurrencyI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collCurrencyI18ns) {
@@ -2794,7 +2794,7 @@ abstract class Currency implements ActiveRecordInterface
*
* @return ChildCurrency The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildCurrencyI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/CurrencyI18n.php b/core/lib/Thelia/Model/Base/CurrencyI18n.php
old mode 100755
new mode 100644
index 52cd7fc5b..df5ff7240
--- a/core/lib/Thelia/Model/Base/CurrencyI18n.php
+++ b/core/lib/Thelia/Model/Base/CurrencyI18n.php
@@ -61,7 +61,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -93,7 +93,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -254,7 +254,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -462,7 +462,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/CurrencyI18nQuery.php b/core/lib/Thelia/Model/Base/CurrencyI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/CurrencyQuery.php b/core/lib/Thelia/Model/Base/CurrencyQuery.php
old mode 100755
new mode 100644
index 9b4ecf51e..eb4b1b2f7
--- a/core/lib/Thelia/Model/Base/CurrencyQuery.php
+++ b/core/lib/Thelia/Model/Base/CurrencyQuery.php
@@ -1025,7 +1025,7 @@ abstract class CurrencyQuery extends ModelCriteria
*
* @return ChildCurrencyQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'CurrencyI18n';
@@ -1043,7 +1043,7 @@ abstract class CurrencyQuery extends ModelCriteria
*
* @return ChildCurrencyQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -1064,7 +1064,7 @@ abstract class CurrencyQuery extends ModelCriteria
*
* @return ChildCurrencyI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/Customer.php b/core/lib/Thelia/Model/Base/Customer.php
old mode 100755
new mode 100644
index c3315ac6f..3d87f3e28
--- a/core/lib/Thelia/Model/Base/Customer.php
+++ b/core/lib/Thelia/Model/Base/Customer.php
@@ -352,7 +352,7 @@ abstract class Customer implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/CustomerQuery.php b/core/lib/Thelia/Model/Base/CustomerQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/CustomerTitle.php b/core/lib/Thelia/Model/Base/CustomerTitle.php
old mode 100755
new mode 100644
index 7f4c30d09..6b1295d2b
--- a/core/lib/Thelia/Model/Base/CustomerTitle.php
+++ b/core/lib/Thelia/Model/Base/CustomerTitle.php
@@ -124,7 +124,7 @@ abstract class CustomerTitle implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -319,7 +319,7 @@ abstract class CustomerTitle implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -2106,7 +2106,7 @@ abstract class CustomerTitle implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collCustomers instanceof Collection) {
@@ -2156,7 +2156,7 @@ abstract class CustomerTitle implements ActiveRecordInterface
*
* @return ChildCustomerTitle The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -2180,7 +2180,7 @@ abstract class CustomerTitle implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildCustomerTitleI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collCustomerTitleI18ns) {
@@ -2215,7 +2215,7 @@ abstract class CustomerTitle implements ActiveRecordInterface
*
* @return ChildCustomerTitle The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildCustomerTitleI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/CustomerTitleI18n.php b/core/lib/Thelia/Model/Base/CustomerTitleI18n.php
old mode 100755
new mode 100644
index 38e47ecda..b384210b1
--- a/core/lib/Thelia/Model/Base/CustomerTitleI18n.php
+++ b/core/lib/Thelia/Model/Base/CustomerTitleI18n.php
@@ -61,7 +61,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -99,7 +99,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -260,7 +260,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -500,7 +500,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/CustomerTitleI18nQuery.php b/core/lib/Thelia/Model/Base/CustomerTitleI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/CustomerTitleQuery.php b/core/lib/Thelia/Model/Base/CustomerTitleQuery.php
old mode 100755
new mode 100644
index 1c4be4081..ea34c8c91
--- a/core/lib/Thelia/Model/Base/CustomerTitleQuery.php
+++ b/core/lib/Thelia/Model/Base/CustomerTitleQuery.php
@@ -825,7 +825,7 @@ abstract class CustomerTitleQuery extends ModelCriteria
*
* @return ChildCustomerTitleQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'CustomerTitleI18n';
@@ -843,7 +843,7 @@ abstract class CustomerTitleQuery extends ModelCriteria
*
* @return ChildCustomerTitleQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -864,7 +864,7 @@ abstract class CustomerTitleQuery extends ModelCriteria
*
* @return ChildCustomerTitleI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/Delivzone.php b/core/lib/Thelia/Model/Base/Delivzone.php
old mode 100755
new mode 100644
index 08125044e..deb21997e
--- a/core/lib/Thelia/Model/Base/Delivzone.php
+++ b/core/lib/Thelia/Model/Base/Delivzone.php
@@ -255,7 +255,7 @@ abstract class Delivzone implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/DelivzoneQuery.php b/core/lib/Thelia/Model/Base/DelivzoneQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/Feature.php b/core/lib/Thelia/Model/Base/Feature.php
old mode 100755
new mode 100644
index 826de003f..2860a4155
--- a/core/lib/Thelia/Model/Base/Feature.php
+++ b/core/lib/Thelia/Model/Base/Feature.php
@@ -139,7 +139,7 @@ abstract class Feature implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -346,7 +346,7 @@ abstract class Feature implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -2628,7 +2628,7 @@ abstract class Feature implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collFeatureAvs instanceof Collection) {
@@ -2686,7 +2686,7 @@ abstract class Feature implements ActiveRecordInterface
*
* @return ChildFeature The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -2710,7 +2710,7 @@ abstract class Feature implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildFeatureI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collFeatureI18ns) {
@@ -2745,7 +2745,7 @@ abstract class Feature implements ActiveRecordInterface
*
* @return ChildFeature The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildFeatureI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/FeatureAv.php b/core/lib/Thelia/Model/Base/FeatureAv.php
old mode 100755
new mode 100644
index 818f352a0..bf1bfc41e
--- a/core/lib/Thelia/Model/Base/FeatureAv.php
+++ b/core/lib/Thelia/Model/Base/FeatureAv.php
@@ -122,7 +122,7 @@ abstract class FeatureAv implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -298,7 +298,7 @@ abstract class FeatureAv implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -1900,7 +1900,7 @@ abstract class FeatureAv implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collFeatureProducts instanceof Collection) {
@@ -1947,7 +1947,7 @@ abstract class FeatureAv implements ActiveRecordInterface
*
* @return ChildFeatureAv The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -1971,7 +1971,7 @@ abstract class FeatureAv implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildFeatureAvI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collFeatureAvI18ns) {
@@ -2006,7 +2006,7 @@ abstract class FeatureAv implements ActiveRecordInterface
*
* @return ChildFeatureAv The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildFeatureAvI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/FeatureAvI18n.php b/core/lib/Thelia/Model/Base/FeatureAvI18n.php
old mode 100755
new mode 100644
index aa524c430..44e7893a2
--- a/core/lib/Thelia/Model/Base/FeatureAvI18n.php
+++ b/core/lib/Thelia/Model/Base/FeatureAvI18n.php
@@ -61,7 +61,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -111,7 +111,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -272,7 +272,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -576,7 +576,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/FeatureAvI18nQuery.php b/core/lib/Thelia/Model/Base/FeatureAvI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/FeatureAvQuery.php b/core/lib/Thelia/Model/Base/FeatureAvQuery.php
old mode 100755
new mode 100644
index 6b3af4ed9..fb3796c97
--- a/core/lib/Thelia/Model/Base/FeatureAvQuery.php
+++ b/core/lib/Thelia/Model/Base/FeatureAvQuery.php
@@ -841,7 +841,7 @@ abstract class FeatureAvQuery extends ModelCriteria
*
* @return ChildFeatureAvQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'FeatureAvI18n';
@@ -859,7 +859,7 @@ abstract class FeatureAvQuery extends ModelCriteria
*
* @return ChildFeatureAvQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -880,7 +880,7 @@ abstract class FeatureAvQuery extends ModelCriteria
*
* @return ChildFeatureAvI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/FeatureCategory.php b/core/lib/Thelia/Model/Base/FeatureCategory.php
old mode 100755
new mode 100644
index f3ce14349..035e077d2
--- a/core/lib/Thelia/Model/Base/FeatureCategory.php
+++ b/core/lib/Thelia/Model/Base/FeatureCategory.php
@@ -262,7 +262,7 @@ abstract class FeatureCategory implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/FeatureCategoryQuery.php b/core/lib/Thelia/Model/Base/FeatureCategoryQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/FeatureI18n.php b/core/lib/Thelia/Model/Base/FeatureI18n.php
old mode 100755
new mode 100644
index b6070932e..57c7a0b30
--- a/core/lib/Thelia/Model/Base/FeatureI18n.php
+++ b/core/lib/Thelia/Model/Base/FeatureI18n.php
@@ -61,7 +61,7 @@ abstract class FeatureI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -111,7 +111,7 @@ abstract class FeatureI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -272,7 +272,7 @@ abstract class FeatureI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -576,7 +576,7 @@ abstract class FeatureI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/FeatureI18nQuery.php b/core/lib/Thelia/Model/Base/FeatureI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/FeatureProduct.php b/core/lib/Thelia/Model/Base/FeatureProduct.php
old mode 100755
new mode 100644
index b68f4acd2..4af200d51
--- a/core/lib/Thelia/Model/Base/FeatureProduct.php
+++ b/core/lib/Thelia/Model/Base/FeatureProduct.php
@@ -287,7 +287,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/FeatureProductQuery.php b/core/lib/Thelia/Model/Base/FeatureProductQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/FeatureQuery.php b/core/lib/Thelia/Model/Base/FeatureQuery.php
old mode 100755
new mode 100644
index f1fc81a3f..9b00e812e
--- a/core/lib/Thelia/Model/Base/FeatureQuery.php
+++ b/core/lib/Thelia/Model/Base/FeatureQuery.php
@@ -931,7 +931,7 @@ abstract class FeatureQuery extends ModelCriteria
*
* @return ChildFeatureQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'FeatureI18n';
@@ -949,7 +949,7 @@ abstract class FeatureQuery extends ModelCriteria
*
* @return ChildFeatureQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -970,7 +970,7 @@ abstract class FeatureQuery extends ModelCriteria
*
* @return ChildFeatureI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/Folder.php b/core/lib/Thelia/Model/Base/Folder.php
old mode 100755
new mode 100644
index 5c3e7aaa3..4457c5042
--- a/core/lib/Thelia/Model/Base/Folder.php
+++ b/core/lib/Thelia/Model/Base/Folder.php
@@ -172,7 +172,7 @@ abstract class Folder implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -393,7 +393,7 @@ abstract class Folder implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -3117,7 +3117,7 @@ abstract class Folder implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collContentFolders instanceof Collection) {
@@ -3179,7 +3179,7 @@ abstract class Folder implements ActiveRecordInterface
*
* @return ChildFolder The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -3203,7 +3203,7 @@ abstract class Folder implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildFolderI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collFolderI18ns) {
@@ -3238,7 +3238,7 @@ abstract class Folder implements ActiveRecordInterface
*
* @return ChildFolder The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildFolderI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/FolderDocument.php b/core/lib/Thelia/Model/Base/FolderDocument.php
old mode 100755
new mode 100644
index 25b68a842..8e24ee9d4
--- a/core/lib/Thelia/Model/Base/FolderDocument.php
+++ b/core/lib/Thelia/Model/Base/FolderDocument.php
@@ -120,7 +120,7 @@ abstract class FolderDocument implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -290,7 +290,7 @@ abstract class FolderDocument implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -1640,7 +1640,7 @@ abstract class FolderDocument implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collFolderDocumentI18ns instanceof Collection) {
@@ -1683,7 +1683,7 @@ abstract class FolderDocument implements ActiveRecordInterface
*
* @return ChildFolderDocument The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -1707,7 +1707,7 @@ abstract class FolderDocument implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildFolderDocumentI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collFolderDocumentI18ns) {
@@ -1742,7 +1742,7 @@ abstract class FolderDocument implements ActiveRecordInterface
*
* @return ChildFolderDocument The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildFolderDocumentI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/FolderDocumentI18n.php b/core/lib/Thelia/Model/Base/FolderDocumentI18n.php
old mode 100755
new mode 100644
index 520160758..b68c8ce9d
--- a/core/lib/Thelia/Model/Base/FolderDocumentI18n.php
+++ b/core/lib/Thelia/Model/Base/FolderDocumentI18n.php
@@ -61,7 +61,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -111,7 +111,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -272,7 +272,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -576,7 +576,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/FolderDocumentI18nQuery.php b/core/lib/Thelia/Model/Base/FolderDocumentI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/FolderDocumentQuery.php b/core/lib/Thelia/Model/Base/FolderDocumentQuery.php
old mode 100755
new mode 100644
index 85ed5c241..b1c41a29e
--- a/core/lib/Thelia/Model/Base/FolderDocumentQuery.php
+++ b/core/lib/Thelia/Model/Base/FolderDocumentQuery.php
@@ -797,7 +797,7 @@ abstract class FolderDocumentQuery extends ModelCriteria
*
* @return ChildFolderDocumentQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'FolderDocumentI18n';
@@ -815,7 +815,7 @@ abstract class FolderDocumentQuery extends ModelCriteria
*
* @return ChildFolderDocumentQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -836,7 +836,7 @@ abstract class FolderDocumentQuery extends ModelCriteria
*
* @return ChildFolderDocumentI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/FolderI18n.php b/core/lib/Thelia/Model/Base/FolderI18n.php
old mode 100755
new mode 100644
index 35e69d6a6..976c6b041
--- a/core/lib/Thelia/Model/Base/FolderI18n.php
+++ b/core/lib/Thelia/Model/Base/FolderI18n.php
@@ -61,7 +61,7 @@ abstract class FolderI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -111,7 +111,7 @@ abstract class FolderI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -272,7 +272,7 @@ abstract class FolderI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -576,7 +576,7 @@ abstract class FolderI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/FolderI18nQuery.php b/core/lib/Thelia/Model/Base/FolderI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/FolderImage.php b/core/lib/Thelia/Model/Base/FolderImage.php
old mode 100755
new mode 100644
index 73bfd11b8..525dc9d48
--- a/core/lib/Thelia/Model/Base/FolderImage.php
+++ b/core/lib/Thelia/Model/Base/FolderImage.php
@@ -120,7 +120,7 @@ abstract class FolderImage implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -290,7 +290,7 @@ abstract class FolderImage implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -1640,7 +1640,7 @@ abstract class FolderImage implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collFolderImageI18ns instanceof Collection) {
@@ -1683,7 +1683,7 @@ abstract class FolderImage implements ActiveRecordInterface
*
* @return ChildFolderImage The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -1707,7 +1707,7 @@ abstract class FolderImage implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildFolderImageI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collFolderImageI18ns) {
@@ -1742,7 +1742,7 @@ abstract class FolderImage implements ActiveRecordInterface
*
* @return ChildFolderImage The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildFolderImageI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/FolderImageI18n.php b/core/lib/Thelia/Model/Base/FolderImageI18n.php
old mode 100755
new mode 100644
index 9096c8542..6ac9575e1
--- a/core/lib/Thelia/Model/Base/FolderImageI18n.php
+++ b/core/lib/Thelia/Model/Base/FolderImageI18n.php
@@ -61,7 +61,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -111,7 +111,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -272,7 +272,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -576,7 +576,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/FolderImageI18nQuery.php b/core/lib/Thelia/Model/Base/FolderImageI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/FolderImageQuery.php b/core/lib/Thelia/Model/Base/FolderImageQuery.php
old mode 100755
new mode 100644
index 4ea930e20..ca12e098e
--- a/core/lib/Thelia/Model/Base/FolderImageQuery.php
+++ b/core/lib/Thelia/Model/Base/FolderImageQuery.php
@@ -797,7 +797,7 @@ abstract class FolderImageQuery extends ModelCriteria
*
* @return ChildFolderImageQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'FolderImageI18n';
@@ -815,7 +815,7 @@ abstract class FolderImageQuery extends ModelCriteria
*
* @return ChildFolderImageQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -836,7 +836,7 @@ abstract class FolderImageQuery extends ModelCriteria
*
* @return ChildFolderImageI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/FolderQuery.php b/core/lib/Thelia/Model/Base/FolderQuery.php
old mode 100755
new mode 100644
index 28f9bc8a3..d7d6794c5
--- a/core/lib/Thelia/Model/Base/FolderQuery.php
+++ b/core/lib/Thelia/Model/Base/FolderQuery.php
@@ -1185,7 +1185,7 @@ abstract class FolderQuery extends ModelCriteria
*
* @return ChildFolderQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'FolderI18n';
@@ -1203,7 +1203,7 @@ abstract class FolderQuery extends ModelCriteria
*
* @return ChildFolderQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -1224,7 +1224,7 @@ abstract class FolderQuery extends ModelCriteria
*
* @return ChildFolderI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/FolderVersion.php b/core/lib/Thelia/Model/Base/FolderVersion.php
old mode 100755
new mode 100644
index 4f6305b7e..ec588dcbd
--- a/core/lib/Thelia/Model/Base/FolderVersion.php
+++ b/core/lib/Thelia/Model/Base/FolderVersion.php
@@ -292,7 +292,7 @@ abstract class FolderVersion implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/FolderVersionQuery.php b/core/lib/Thelia/Model/Base/FolderVersionQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/Group.php b/core/lib/Thelia/Model/Base/Group.php
old mode 100755
new mode 100644
index 6b66d5f39..19d41e38c
--- a/core/lib/Thelia/Model/Base/Group.php
+++ b/core/lib/Thelia/Model/Base/Group.php
@@ -139,7 +139,7 @@ abstract class Group implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -339,7 +339,7 @@ abstract class Group implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -2786,7 +2786,7 @@ abstract class Group implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collAdminGroups instanceof Collection) {
@@ -2848,7 +2848,7 @@ abstract class Group implements ActiveRecordInterface
*
* @return ChildGroup The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -2872,7 +2872,7 @@ abstract class Group implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildGroupI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collGroupI18ns) {
@@ -2907,7 +2907,7 @@ abstract class Group implements ActiveRecordInterface
*
* @return ChildGroup The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildGroupI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/GroupI18n.php b/core/lib/Thelia/Model/Base/GroupI18n.php
old mode 100755
new mode 100644
index de90d8863..df8f3f81a
--- a/core/lib/Thelia/Model/Base/GroupI18n.php
+++ b/core/lib/Thelia/Model/Base/GroupI18n.php
@@ -61,7 +61,7 @@ abstract class GroupI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -111,7 +111,7 @@ abstract class GroupI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -272,7 +272,7 @@ abstract class GroupI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -576,7 +576,7 @@ abstract class GroupI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/GroupI18nQuery.php b/core/lib/Thelia/Model/Base/GroupI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/GroupModule.php b/core/lib/Thelia/Model/Base/GroupModule.php
old mode 100755
new mode 100644
index 620ca9c91..82d6056f2
--- a/core/lib/Thelia/Model/Base/GroupModule.php
+++ b/core/lib/Thelia/Model/Base/GroupModule.php
@@ -282,7 +282,7 @@ abstract class GroupModule implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/GroupModuleQuery.php b/core/lib/Thelia/Model/Base/GroupModuleQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/GroupQuery.php b/core/lib/Thelia/Model/Base/GroupQuery.php
old mode 100755
new mode 100644
index 8ca963848..d0eded79b
--- a/core/lib/Thelia/Model/Base/GroupQuery.php
+++ b/core/lib/Thelia/Model/Base/GroupQuery.php
@@ -891,7 +891,7 @@ abstract class GroupQuery extends ModelCriteria
*
* @return ChildGroupQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'GroupI18n';
@@ -909,7 +909,7 @@ abstract class GroupQuery extends ModelCriteria
*
* @return ChildGroupQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -930,7 +930,7 @@ abstract class GroupQuery extends ModelCriteria
*
* @return ChildGroupI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/GroupResource.php b/core/lib/Thelia/Model/Base/GroupResource.php
old mode 100755
new mode 100644
index 84d6006b0..ea6c0ff47
--- a/core/lib/Thelia/Model/Base/GroupResource.php
+++ b/core/lib/Thelia/Model/Base/GroupResource.php
@@ -290,7 +290,7 @@ abstract class GroupResource implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/GroupResourceQuery.php b/core/lib/Thelia/Model/Base/GroupResourceQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/Lang.php b/core/lib/Thelia/Model/Base/Lang.php
old mode 100755
new mode 100644
index 3379594ef..293b0f3a7
--- a/core/lib/Thelia/Model/Base/Lang.php
+++ b/core/lib/Thelia/Model/Base/Lang.php
@@ -272,7 +272,7 @@ abstract class Lang implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/LangQuery.php b/core/lib/Thelia/Model/Base/LangQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/Message.php b/core/lib/Thelia/Model/Base/Message.php
old mode 100755
new mode 100644
index f39e4ecbe..4ee6b4cab
--- a/core/lib/Thelia/Model/Base/Message.php
+++ b/core/lib/Thelia/Model/Base/Message.php
@@ -67,10 +67,10 @@ abstract class Message implements ActiveRecordInterface
protected $id;
/**
- * The value for the code field.
+ * The value for the name field.
* @var string
*/
- protected $code;
+ protected $name;
/**
* The value for the secured field.
@@ -78,12 +78,6 @@ abstract class Message implements ActiveRecordInterface
*/
protected $secured;
- /**
- * The value for the ref field.
- * @var string
- */
- protected $ref;
-
/**
* The value for the created_at field.
* @var string
@@ -141,7 +135,7 @@ abstract class Message implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -338,7 +332,7 @@ abstract class Message implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -448,14 +442,14 @@ abstract class Message implements ActiveRecordInterface
}
/**
- * Get the [code] column value.
+ * Get the [name] column value.
*
* @return string
*/
- public function getCode()
+ public function getName()
{
- return $this->code;
+ return $this->name;
}
/**
@@ -469,17 +463,6 @@ abstract class Message implements ActiveRecordInterface
return $this->secured;
}
- /**
- * Get the [ref] column value.
- *
- * @return string
- */
- public function getRef()
- {
-
- return $this->ref;
- }
-
/**
* Get the [optionally formatted] temporal [created_at] column value.
*
@@ -584,25 +567,25 @@ abstract class Message implements ActiveRecordInterface
} // setId()
/**
- * Set the value of [code] column.
+ * Set the value of [name] column.
*
* @param string $v new value
* @return \Thelia\Model\Message The current object (for fluent API support)
*/
- public function setCode($v)
+ public function setName($v)
{
if ($v !== null) {
$v = (string) $v;
}
- if ($this->code !== $v) {
- $this->code = $v;
- $this->modifiedColumns[] = MessageTableMap::CODE;
+ if ($this->name !== $v) {
+ $this->name = $v;
+ $this->modifiedColumns[] = MessageTableMap::NAME;
}
return $this;
- } // setCode()
+ } // setName()
/**
* Set the value of [secured] column.
@@ -625,27 +608,6 @@ abstract class Message implements ActiveRecordInterface
return $this;
} // setSecured()
- /**
- * Set the value of [ref] column.
- *
- * @param string $v new value
- * @return \Thelia\Model\Message The current object (for fluent API support)
- */
- public function setRef($v)
- {
- if ($v !== null) {
- $v = (string) $v;
- }
-
- if ($this->ref !== $v) {
- $this->ref = $v;
- $this->modifiedColumns[] = MessageTableMap::REF;
- }
-
-
- return $this;
- } // setRef()
-
/**
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
*
@@ -795,37 +757,34 @@ abstract class Message implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : MessageTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : MessageTableMap::translateFieldName('Code', TableMap::TYPE_PHPNAME, $indexType)];
- $this->code = (null !== $col) ? (string) $col : null;
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : MessageTableMap::translateFieldName('Name', TableMap::TYPE_PHPNAME, $indexType)];
+ $this->name = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : MessageTableMap::translateFieldName('Secured', TableMap::TYPE_PHPNAME, $indexType)];
$this->secured = (null !== $col) ? (int) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageTableMap::translateFieldName('Ref', TableMap::TYPE_PHPNAME, $indexType)];
- $this->ref = (null !== $col) ? (string) $col : null;
-
- $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageTableMap::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 ? 5 + $startcol : MessageTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageTableMap::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 ? 6 + $startcol : MessageTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : MessageTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
$this->version = (null !== $col) ? (int) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : MessageTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : MessageTableMap::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 ? 8 + $startcol : MessageTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : MessageTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
$this->version_created_by = (null !== $col) ? (string) $col : null;
$this->resetModified();
@@ -835,7 +794,7 @@ abstract class Message implements ActiveRecordInterface
$this->ensureConsistency();
}
- return $startcol + 9; // 9 = MessageTableMap::NUM_HYDRATE_COLUMNS.
+ return $startcol + 8; // 8 = MessageTableMap::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating \Thelia\Model\Message object", 0, $e);
@@ -1108,15 +1067,12 @@ abstract class Message implements ActiveRecordInterface
if ($this->isColumnModified(MessageTableMap::ID)) {
$modifiedColumns[':p' . $index++] = 'ID';
}
- if ($this->isColumnModified(MessageTableMap::CODE)) {
- $modifiedColumns[':p' . $index++] = 'CODE';
+ if ($this->isColumnModified(MessageTableMap::NAME)) {
+ $modifiedColumns[':p' . $index++] = 'NAME';
}
if ($this->isColumnModified(MessageTableMap::SECURED)) {
$modifiedColumns[':p' . $index++] = 'SECURED';
}
- if ($this->isColumnModified(MessageTableMap::REF)) {
- $modifiedColumns[':p' . $index++] = 'REF';
- }
if ($this->isColumnModified(MessageTableMap::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
}
@@ -1146,15 +1102,12 @@ abstract class Message implements ActiveRecordInterface
case 'ID':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
break;
- case 'CODE':
- $stmt->bindValue($identifier, $this->code, PDO::PARAM_STR);
+ case 'NAME':
+ $stmt->bindValue($identifier, $this->name, PDO::PARAM_STR);
break;
case 'SECURED':
$stmt->bindValue($identifier, $this->secured, PDO::PARAM_INT);
break;
- case 'REF':
- $stmt->bindValue($identifier, $this->ref, 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;
@@ -1236,27 +1189,24 @@ abstract class Message implements ActiveRecordInterface
return $this->getId();
break;
case 1:
- return $this->getCode();
+ return $this->getName();
break;
case 2:
return $this->getSecured();
break;
case 3:
- return $this->getRef();
- break;
- case 4:
return $this->getCreatedAt();
break;
- case 5:
+ case 4:
return $this->getUpdatedAt();
break;
- case 6:
+ case 5:
return $this->getVersion();
break;
- case 7:
+ case 6:
return $this->getVersionCreatedAt();
break;
- case 8:
+ case 7:
return $this->getVersionCreatedBy();
break;
default:
@@ -1289,14 +1239,13 @@ abstract class Message implements ActiveRecordInterface
$keys = MessageTableMap::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getId(),
- $keys[1] => $this->getCode(),
+ $keys[1] => $this->getName(),
$keys[2] => $this->getSecured(),
- $keys[3] => $this->getRef(),
- $keys[4] => $this->getCreatedAt(),
- $keys[5] => $this->getUpdatedAt(),
- $keys[6] => $this->getVersion(),
- $keys[7] => $this->getVersionCreatedAt(),
- $keys[8] => $this->getVersionCreatedBy(),
+ $keys[3] => $this->getCreatedAt(),
+ $keys[4] => $this->getUpdatedAt(),
+ $keys[5] => $this->getVersion(),
+ $keys[6] => $this->getVersionCreatedAt(),
+ $keys[7] => $this->getVersionCreatedBy(),
);
$virtualColumns = $this->virtualColumns;
foreach($virtualColumns as $key => $virtualColumn)
@@ -1349,27 +1298,24 @@ abstract class Message implements ActiveRecordInterface
$this->setId($value);
break;
case 1:
- $this->setCode($value);
+ $this->setName($value);
break;
case 2:
$this->setSecured($value);
break;
case 3:
- $this->setRef($value);
- break;
- case 4:
$this->setCreatedAt($value);
break;
- case 5:
+ case 4:
$this->setUpdatedAt($value);
break;
- case 6:
+ case 5:
$this->setVersion($value);
break;
- case 7:
+ case 6:
$this->setVersionCreatedAt($value);
break;
- case 8:
+ case 7:
$this->setVersionCreatedBy($value);
break;
} // switch()
@@ -1397,14 +1343,13 @@ abstract class Message implements ActiveRecordInterface
$keys = MessageTableMap::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
- if (array_key_exists($keys[1], $arr)) $this->setCode($arr[$keys[1]]);
+ if (array_key_exists($keys[1], $arr)) $this->setName($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setSecured($arr[$keys[2]]);
- if (array_key_exists($keys[3], $arr)) $this->setRef($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]]);
+ if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]);
+ if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]);
+ if (array_key_exists($keys[5], $arr)) $this->setVersion($arr[$keys[5]]);
+ if (array_key_exists($keys[6], $arr)) $this->setVersionCreatedAt($arr[$keys[6]]);
+ if (array_key_exists($keys[7], $arr)) $this->setVersionCreatedBy($arr[$keys[7]]);
}
/**
@@ -1417,9 +1362,8 @@ abstract class Message implements ActiveRecordInterface
$criteria = new Criteria(MessageTableMap::DATABASE_NAME);
if ($this->isColumnModified(MessageTableMap::ID)) $criteria->add(MessageTableMap::ID, $this->id);
- if ($this->isColumnModified(MessageTableMap::CODE)) $criteria->add(MessageTableMap::CODE, $this->code);
+ if ($this->isColumnModified(MessageTableMap::NAME)) $criteria->add(MessageTableMap::NAME, $this->name);
if ($this->isColumnModified(MessageTableMap::SECURED)) $criteria->add(MessageTableMap::SECURED, $this->secured);
- if ($this->isColumnModified(MessageTableMap::REF)) $criteria->add(MessageTableMap::REF, $this->ref);
if ($this->isColumnModified(MessageTableMap::CREATED_AT)) $criteria->add(MessageTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(MessageTableMap::UPDATED_AT)) $criteria->add(MessageTableMap::UPDATED_AT, $this->updated_at);
if ($this->isColumnModified(MessageTableMap::VERSION)) $criteria->add(MessageTableMap::VERSION, $this->version);
@@ -1488,9 +1432,8 @@ abstract class Message implements ActiveRecordInterface
*/
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
{
- $copyObj->setCode($this->getCode());
+ $copyObj->setName($this->getName());
$copyObj->setSecured($this->getSecured());
- $copyObj->setRef($this->getRef());
$copyObj->setCreatedAt($this->getCreatedAt());
$copyObj->setUpdatedAt($this->getUpdatedAt());
$copyObj->setVersion($this->getVersion());
@@ -2015,9 +1958,8 @@ abstract class Message implements ActiveRecordInterface
public function clear()
{
$this->id = null;
- $this->code = null;
+ $this->name = null;
$this->secured = null;
- $this->ref = null;
$this->created_at = null;
$this->updated_at = null;
$this->version = null;
@@ -2056,7 +1998,7 @@ abstract class Message implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collMessageI18ns instanceof Collection) {
@@ -2102,7 +2044,7 @@ abstract class Message implements ActiveRecordInterface
*
* @return ChildMessage The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -2126,7 +2068,7 @@ abstract class Message implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildMessageI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collMessageI18ns) {
@@ -2161,7 +2103,7 @@ abstract class Message implements ActiveRecordInterface
*
* @return ChildMessage The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildMessageI18nQuery::create()
@@ -2218,48 +2160,72 @@ abstract class Message implements ActiveRecordInterface
/**
- * Get the [description] column value.
+ * Get the [subject] column value.
*
* @return string
*/
- public function getDescription()
+ public function getSubject()
{
- return $this->getCurrentTranslation()->getDescription();
+ return $this->getCurrentTranslation()->getSubject();
}
/**
- * Set the value of [description] column.
+ * Set the value of [subject] column.
*
* @param string $v new value
* @return \Thelia\Model\MessageI18n The current object (for fluent API support)
*/
- public function setDescription($v)
- { $this->getCurrentTranslation()->setDescription($v);
+ public function setSubject($v)
+ { $this->getCurrentTranslation()->setSubject($v);
return $this;
}
/**
- * Get the [description_html] column value.
+ * Get the [text_message] column value.
*
* @return string
*/
- public function getDescriptionHtml()
+ public function getTextMessage()
{
- return $this->getCurrentTranslation()->getDescriptionHtml();
+ return $this->getCurrentTranslation()->getTextMessage();
}
/**
- * Set the value of [description_html] column.
+ * Set the value of [text_message] column.
*
* @param string $v new value
* @return \Thelia\Model\MessageI18n The current object (for fluent API support)
*/
- public function setDescriptionHtml($v)
- { $this->getCurrentTranslation()->setDescriptionHtml($v);
+ public function setTextMessage($v)
+ { $this->getCurrentTranslation()->setTextMessage($v);
+
+ return $this;
+ }
+
+
+ /**
+ * Get the [html_message] column value.
+ *
+ * @return string
+ */
+ public function getHtmlMessage()
+ {
+ return $this->getCurrentTranslation()->getHtmlMessage();
+ }
+
+
+ /**
+ * Set the value of [html_message] column.
+ *
+ * @param string $v new value
+ * @return \Thelia\Model\MessageI18n The current object (for fluent API support)
+ */
+ public function setHtmlMessage($v)
+ { $this->getCurrentTranslation()->setHtmlMessage($v);
return $this;
}
@@ -2313,9 +2279,8 @@ abstract class Message implements ActiveRecordInterface
$version = new ChildMessageVersion();
$version->setId($this->getId());
- $version->setCode($this->getCode());
+ $version->setName($this->getName());
$version->setSecured($this->getSecured());
- $version->setRef($this->getRef());
$version->setCreatedAt($this->getCreatedAt());
$version->setUpdatedAt($this->getUpdatedAt());
$version->setVersion($this->getVersion());
@@ -2359,9 +2324,8 @@ abstract class Message implements ActiveRecordInterface
{
$loadedObjects['ChildMessage'][$version->getId()][$version->getVersion()] = $this;
$this->setId($version->getId());
- $this->setCode($version->getCode());
+ $this->setName($version->getName());
$this->setSecured($version->getSecured());
- $this->setRef($version->getRef());
$this->setCreatedAt($version->getCreatedAt());
$this->setUpdatedAt($version->getUpdatedAt());
$this->setVersion($version->getVersion());
diff --git a/core/lib/Thelia/Model/Base/MessageI18n.php b/core/lib/Thelia/Model/Base/MessageI18n.php
old mode 100755
new mode 100644
index 545e75244..d37682f97
--- a/core/lib/Thelia/Model/Base/MessageI18n.php
+++ b/core/lib/Thelia/Model/Base/MessageI18n.php
@@ -61,7 +61,7 @@ abstract class MessageI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -73,16 +73,22 @@ abstract class MessageI18n implements ActiveRecordInterface
protected $title;
/**
- * The value for the description field.
+ * The value for the subject field.
* @var string
*/
- protected $description;
+ protected $subject;
/**
- * The value for the description_html field.
+ * The value for the text_message field.
* @var string
*/
- protected $description_html;
+ protected $text_message;
+
+ /**
+ * The value for the html_message field.
+ * @var string
+ */
+ protected $html_message;
/**
* @var Message
@@ -105,7 +111,7 @@ abstract class MessageI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -266,7 +272,7 @@ abstract class MessageI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -398,25 +404,36 @@ abstract class MessageI18n implements ActiveRecordInterface
}
/**
- * Get the [description] column value.
+ * Get the [subject] column value.
*
* @return string
*/
- public function getDescription()
+ public function getSubject()
{
- return $this->description;
+ return $this->subject;
}
/**
- * Get the [description_html] column value.
+ * Get the [text_message] column value.
*
* @return string
*/
- public function getDescriptionHtml()
+ public function getTextMessage()
{
- return $this->description_html;
+ return $this->text_message;
+ }
+
+ /**
+ * Get the [html_message] column value.
+ *
+ * @return string
+ */
+ public function getHtmlMessage()
+ {
+
+ return $this->html_message;
}
/**
@@ -487,46 +504,67 @@ abstract class MessageI18n implements ActiveRecordInterface
} // setTitle()
/**
- * Set the value of [description] column.
+ * Set the value of [subject] column.
*
* @param string $v new value
* @return \Thelia\Model\MessageI18n The current object (for fluent API support)
*/
- public function setDescription($v)
+ public function setSubject($v)
{
if ($v !== null) {
$v = (string) $v;
}
- if ($this->description !== $v) {
- $this->description = $v;
- $this->modifiedColumns[] = MessageI18nTableMap::DESCRIPTION;
+ if ($this->subject !== $v) {
+ $this->subject = $v;
+ $this->modifiedColumns[] = MessageI18nTableMap::SUBJECT;
}
return $this;
- } // setDescription()
+ } // setSubject()
/**
- * Set the value of [description_html] column.
+ * Set the value of [text_message] column.
*
* @param string $v new value
* @return \Thelia\Model\MessageI18n The current object (for fluent API support)
*/
- public function setDescriptionHtml($v)
+ public function setTextMessage($v)
{
if ($v !== null) {
$v = (string) $v;
}
- if ($this->description_html !== $v) {
- $this->description_html = $v;
- $this->modifiedColumns[] = MessageI18nTableMap::DESCRIPTION_HTML;
+ if ($this->text_message !== $v) {
+ $this->text_message = $v;
+ $this->modifiedColumns[] = MessageI18nTableMap::TEXT_MESSAGE;
}
return $this;
- } // setDescriptionHtml()
+ } // setTextMessage()
+
+ /**
+ * Set the value of [html_message] column.
+ *
+ * @param string $v new value
+ * @return \Thelia\Model\MessageI18n The current object (for fluent API support)
+ */
+ public function setHtmlMessage($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->html_message !== $v) {
+ $this->html_message = $v;
+ $this->modifiedColumns[] = MessageI18nTableMap::HTML_MESSAGE;
+ }
+
+
+ return $this;
+ } // setHtmlMessage()
/**
* Indicates whether the columns in this object are only set to default values.
@@ -538,7 +576,7 @@ abstract class MessageI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
@@ -578,11 +616,14 @@ abstract class MessageI18n implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : MessageI18nTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
$this->title = (null !== $col) ? (string) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageI18nTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
- $this->description = (null !== $col) ? (string) $col : null;
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageI18nTableMap::translateFieldName('Subject', TableMap::TYPE_PHPNAME, $indexType)];
+ $this->subject = (null !== $col) ? (string) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageI18nTableMap::translateFieldName('DescriptionHtml', TableMap::TYPE_PHPNAME, $indexType)];
- $this->description_html = (null !== $col) ? (string) $col : null;
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageI18nTableMap::translateFieldName('TextMessage', TableMap::TYPE_PHPNAME, $indexType)];
+ $this->text_message = (null !== $col) ? (string) $col : null;
+
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : MessageI18nTableMap::translateFieldName('HtmlMessage', TableMap::TYPE_PHPNAME, $indexType)];
+ $this->html_message = (null !== $col) ? (string) $col : null;
$this->resetModified();
$this->setNew(false);
@@ -591,7 +632,7 @@ abstract class MessageI18n implements ActiveRecordInterface
$this->ensureConsistency();
}
- return $startcol + 5; // 5 = MessageI18nTableMap::NUM_HYDRATE_COLUMNS.
+ return $startcol + 6; // 6 = MessageI18nTableMap::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating \Thelia\Model\MessageI18n object", 0, $e);
@@ -821,11 +862,14 @@ abstract class MessageI18n implements ActiveRecordInterface
if ($this->isColumnModified(MessageI18nTableMap::TITLE)) {
$modifiedColumns[':p' . $index++] = 'TITLE';
}
- if ($this->isColumnModified(MessageI18nTableMap::DESCRIPTION)) {
- $modifiedColumns[':p' . $index++] = 'DESCRIPTION';
+ if ($this->isColumnModified(MessageI18nTableMap::SUBJECT)) {
+ $modifiedColumns[':p' . $index++] = 'SUBJECT';
}
- if ($this->isColumnModified(MessageI18nTableMap::DESCRIPTION_HTML)) {
- $modifiedColumns[':p' . $index++] = 'DESCRIPTION_HTML';
+ if ($this->isColumnModified(MessageI18nTableMap::TEXT_MESSAGE)) {
+ $modifiedColumns[':p' . $index++] = 'TEXT_MESSAGE';
+ }
+ if ($this->isColumnModified(MessageI18nTableMap::HTML_MESSAGE)) {
+ $modifiedColumns[':p' . $index++] = 'HTML_MESSAGE';
}
$sql = sprintf(
@@ -847,11 +891,14 @@ abstract class MessageI18n implements ActiveRecordInterface
case 'TITLE':
$stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
break;
- case 'DESCRIPTION':
- $stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
+ case 'SUBJECT':
+ $stmt->bindValue($identifier, $this->subject, PDO::PARAM_STR);
break;
- case 'DESCRIPTION_HTML':
- $stmt->bindValue($identifier, $this->description_html, PDO::PARAM_STR);
+ case 'TEXT_MESSAGE':
+ $stmt->bindValue($identifier, $this->text_message, PDO::PARAM_STR);
+ break;
+ case 'HTML_MESSAGE':
+ $stmt->bindValue($identifier, $this->html_message, PDO::PARAM_STR);
break;
}
}
@@ -918,10 +965,13 @@ abstract class MessageI18n implements ActiveRecordInterface
return $this->getTitle();
break;
case 3:
- return $this->getDescription();
+ return $this->getSubject();
break;
case 4:
- return $this->getDescriptionHtml();
+ return $this->getTextMessage();
+ break;
+ case 5:
+ return $this->getHtmlMessage();
break;
default:
return null;
@@ -955,8 +1005,9 @@ abstract class MessageI18n implements ActiveRecordInterface
$keys[0] => $this->getId(),
$keys[1] => $this->getLocale(),
$keys[2] => $this->getTitle(),
- $keys[3] => $this->getDescription(),
- $keys[4] => $this->getDescriptionHtml(),
+ $keys[3] => $this->getSubject(),
+ $keys[4] => $this->getTextMessage(),
+ $keys[5] => $this->getHtmlMessage(),
);
$virtualColumns = $this->virtualColumns;
foreach($virtualColumns as $key => $virtualColumn)
@@ -1012,10 +1063,13 @@ abstract class MessageI18n implements ActiveRecordInterface
$this->setTitle($value);
break;
case 3:
- $this->setDescription($value);
+ $this->setSubject($value);
break;
case 4:
- $this->setDescriptionHtml($value);
+ $this->setTextMessage($value);
+ break;
+ case 5:
+ $this->setHtmlMessage($value);
break;
} // switch()
}
@@ -1044,8 +1098,9 @@ abstract class MessageI18n implements ActiveRecordInterface
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setLocale($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setTitle($arr[$keys[2]]);
- if (array_key_exists($keys[3], $arr)) $this->setDescription($arr[$keys[3]]);
- if (array_key_exists($keys[4], $arr)) $this->setDescriptionHtml($arr[$keys[4]]);
+ if (array_key_exists($keys[3], $arr)) $this->setSubject($arr[$keys[3]]);
+ if (array_key_exists($keys[4], $arr)) $this->setTextMessage($arr[$keys[4]]);
+ if (array_key_exists($keys[5], $arr)) $this->setHtmlMessage($arr[$keys[5]]);
}
/**
@@ -1060,8 +1115,9 @@ abstract class MessageI18n implements ActiveRecordInterface
if ($this->isColumnModified(MessageI18nTableMap::ID)) $criteria->add(MessageI18nTableMap::ID, $this->id);
if ($this->isColumnModified(MessageI18nTableMap::LOCALE)) $criteria->add(MessageI18nTableMap::LOCALE, $this->locale);
if ($this->isColumnModified(MessageI18nTableMap::TITLE)) $criteria->add(MessageI18nTableMap::TITLE, $this->title);
- if ($this->isColumnModified(MessageI18nTableMap::DESCRIPTION)) $criteria->add(MessageI18nTableMap::DESCRIPTION, $this->description);
- if ($this->isColumnModified(MessageI18nTableMap::DESCRIPTION_HTML)) $criteria->add(MessageI18nTableMap::DESCRIPTION_HTML, $this->description_html);
+ if ($this->isColumnModified(MessageI18nTableMap::SUBJECT)) $criteria->add(MessageI18nTableMap::SUBJECT, $this->subject);
+ if ($this->isColumnModified(MessageI18nTableMap::TEXT_MESSAGE)) $criteria->add(MessageI18nTableMap::TEXT_MESSAGE, $this->text_message);
+ if ($this->isColumnModified(MessageI18nTableMap::HTML_MESSAGE)) $criteria->add(MessageI18nTableMap::HTML_MESSAGE, $this->html_message);
return $criteria;
}
@@ -1135,8 +1191,9 @@ abstract class MessageI18n implements ActiveRecordInterface
$copyObj->setId($this->getId());
$copyObj->setLocale($this->getLocale());
$copyObj->setTitle($this->getTitle());
- $copyObj->setDescription($this->getDescription());
- $copyObj->setDescriptionHtml($this->getDescriptionHtml());
+ $copyObj->setSubject($this->getSubject());
+ $copyObj->setTextMessage($this->getTextMessage());
+ $copyObj->setHtmlMessage($this->getHtmlMessage());
if ($makeNew) {
$copyObj->setNew(true);
}
@@ -1223,8 +1280,9 @@ abstract class MessageI18n implements ActiveRecordInterface
$this->id = null;
$this->locale = null;
$this->title = null;
- $this->description = null;
- $this->description_html = null;
+ $this->subject = null;
+ $this->text_message = null;
+ $this->html_message = null;
$this->alreadyInSave = false;
$this->clearAllReferences();
$this->applyDefaultValues();
diff --git a/core/lib/Thelia/Model/Base/MessageI18nQuery.php b/core/lib/Thelia/Model/Base/MessageI18nQuery.php
old mode 100755
new mode 100644
index 478c737e8..f63ca675a
--- a/core/lib/Thelia/Model/Base/MessageI18nQuery.php
+++ b/core/lib/Thelia/Model/Base/MessageI18nQuery.php
@@ -24,14 +24,16 @@ use Thelia\Model\Map\MessageI18nTableMap;
* @method ChildMessageI18nQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildMessageI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
* @method ChildMessageI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
- * @method ChildMessageI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
- * @method ChildMessageI18nQuery orderByDescriptionHtml($order = Criteria::ASC) Order by the description_html column
+ * @method ChildMessageI18nQuery orderBySubject($order = Criteria::ASC) Order by the subject column
+ * @method ChildMessageI18nQuery orderByTextMessage($order = Criteria::ASC) Order by the text_message column
+ * @method ChildMessageI18nQuery orderByHtmlMessage($order = Criteria::ASC) Order by the html_message column
*
* @method ChildMessageI18nQuery groupById() Group by the id column
* @method ChildMessageI18nQuery groupByLocale() Group by the locale column
* @method ChildMessageI18nQuery groupByTitle() Group by the title column
- * @method ChildMessageI18nQuery groupByDescription() Group by the description column
- * @method ChildMessageI18nQuery groupByDescriptionHtml() Group by the description_html column
+ * @method ChildMessageI18nQuery groupBySubject() Group by the subject column
+ * @method ChildMessageI18nQuery groupByTextMessage() Group by the text_message column
+ * @method ChildMessageI18nQuery groupByHtmlMessage() Group by the html_message column
*
* @method ChildMessageI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method ChildMessageI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
@@ -47,14 +49,16 @@ use Thelia\Model\Map\MessageI18nTableMap;
* @method ChildMessageI18n findOneById(int $id) Return the first ChildMessageI18n filtered by the id column
* @method ChildMessageI18n findOneByLocale(string $locale) Return the first ChildMessageI18n filtered by the locale column
* @method ChildMessageI18n findOneByTitle(string $title) Return the first ChildMessageI18n filtered by the title column
- * @method ChildMessageI18n findOneByDescription(string $description) Return the first ChildMessageI18n filtered by the description column
- * @method ChildMessageI18n findOneByDescriptionHtml(string $description_html) Return the first ChildMessageI18n filtered by the description_html column
+ * @method ChildMessageI18n findOneBySubject(string $subject) Return the first ChildMessageI18n filtered by the subject column
+ * @method ChildMessageI18n findOneByTextMessage(string $text_message) Return the first ChildMessageI18n filtered by the text_message column
+ * @method ChildMessageI18n findOneByHtmlMessage(string $html_message) Return the first ChildMessageI18n filtered by the html_message column
*
* @method array findById(int $id) Return ChildMessageI18n objects filtered by the id column
* @method array findByLocale(string $locale) Return ChildMessageI18n objects filtered by the locale column
* @method array findByTitle(string $title) Return ChildMessageI18n objects filtered by the title column
- * @method array findByDescription(string $description) Return ChildMessageI18n objects filtered by the description column
- * @method array findByDescriptionHtml(string $description_html) Return ChildMessageI18n objects filtered by the description_html column
+ * @method array findBySubject(string $subject) Return ChildMessageI18n objects filtered by the subject column
+ * @method array findByTextMessage(string $text_message) Return ChildMessageI18n objects filtered by the text_message column
+ * @method array findByHtmlMessage(string $html_message) Return ChildMessageI18n objects filtered by the html_message column
*
*/
abstract class MessageI18nQuery extends ModelCriteria
@@ -143,7 +147,7 @@ abstract class MessageI18nQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
- $sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, DESCRIPTION_HTML FROM message_i18n WHERE ID = :p0 AND LOCALE = :p1';
+ $sql = 'SELECT ID, LOCALE, TITLE, SUBJECT, TEXT_MESSAGE, HTML_MESSAGE FROM message_i18n WHERE ID = :p0 AND LOCALE = :p1';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
@@ -346,61 +350,90 @@ abstract class MessageI18nQuery extends ModelCriteria
}
/**
- * Filter the query on the description column
+ * Filter the query on the subject column
*
* Example usage:
*
- * $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
- * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
+ * $query->filterBySubject('fooValue'); // WHERE subject = 'fooValue'
+ * $query->filterBySubject('%fooValue%'); // WHERE subject LIKE '%fooValue%'
*
*
- * @param string $description The value to use as filter.
+ * @param string $subject 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 ChildMessageI18nQuery The current query, for fluid interface
*/
- public function filterByDescription($description = null, $comparison = null)
+ public function filterBySubject($subject = null, $comparison = null)
{
if (null === $comparison) {
- if (is_array($description)) {
+ if (is_array($subject)) {
$comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $description)) {
- $description = str_replace('*', '%', $description);
+ } elseif (preg_match('/[\%\*]/', $subject)) {
+ $subject = str_replace('*', '%', $subject);
$comparison = Criteria::LIKE;
}
}
- return $this->addUsingAlias(MessageI18nTableMap::DESCRIPTION, $description, $comparison);
+ return $this->addUsingAlias(MessageI18nTableMap::SUBJECT, $subject, $comparison);
}
/**
- * Filter the query on the description_html column
+ * Filter the query on the text_message column
*
* Example usage:
*
- * $query->filterByDescriptionHtml('fooValue'); // WHERE description_html = 'fooValue'
- * $query->filterByDescriptionHtml('%fooValue%'); // WHERE description_html LIKE '%fooValue%'
+ * $query->filterByTextMessage('fooValue'); // WHERE text_message = 'fooValue'
+ * $query->filterByTextMessage('%fooValue%'); // WHERE text_message LIKE '%fooValue%'
*
*
- * @param string $descriptionHtml The value to use as filter.
+ * @param string $textMessage 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 ChildMessageI18nQuery The current query, for fluid interface
*/
- public function filterByDescriptionHtml($descriptionHtml = null, $comparison = null)
+ public function filterByTextMessage($textMessage = null, $comparison = null)
{
if (null === $comparison) {
- if (is_array($descriptionHtml)) {
+ if (is_array($textMessage)) {
$comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $descriptionHtml)) {
- $descriptionHtml = str_replace('*', '%', $descriptionHtml);
+ } elseif (preg_match('/[\%\*]/', $textMessage)) {
+ $textMessage = str_replace('*', '%', $textMessage);
$comparison = Criteria::LIKE;
}
}
- return $this->addUsingAlias(MessageI18nTableMap::DESCRIPTION_HTML, $descriptionHtml, $comparison);
+ return $this->addUsingAlias(MessageI18nTableMap::TEXT_MESSAGE, $textMessage, $comparison);
+ }
+
+ /**
+ * Filter the query on the html_message column
+ *
+ * Example usage:
+ *
+ * $query->filterByHtmlMessage('fooValue'); // WHERE html_message = 'fooValue'
+ * $query->filterByHtmlMessage('%fooValue%'); // WHERE html_message LIKE '%fooValue%'
+ *
+ *
+ * @param string $htmlMessage 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 ChildMessageI18nQuery The current query, for fluid interface
+ */
+ public function filterByHtmlMessage($htmlMessage = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($htmlMessage)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $htmlMessage)) {
+ $htmlMessage = str_replace('*', '%', $htmlMessage);
+ $comparison = Criteria::LIKE;
+ }
+ }
+
+ return $this->addUsingAlias(MessageI18nTableMap::HTML_MESSAGE, $htmlMessage, $comparison);
}
/**
diff --git a/core/lib/Thelia/Model/Base/MessageQuery.php b/core/lib/Thelia/Model/Base/MessageQuery.php
old mode 100755
new mode 100644
index 938a16aab..d72dc7bed
--- a/core/lib/Thelia/Model/Base/MessageQuery.php
+++ b/core/lib/Thelia/Model/Base/MessageQuery.php
@@ -23,9 +23,8 @@ use Thelia\Model\Map\MessageTableMap;
*
*
* @method ChildMessageQuery orderById($order = Criteria::ASC) Order by the id column
- * @method ChildMessageQuery orderByCode($order = Criteria::ASC) Order by the code column
+ * @method ChildMessageQuery orderByName($order = Criteria::ASC) Order by the name column
* @method ChildMessageQuery orderBySecured($order = Criteria::ASC) Order by the secured column
- * @method ChildMessageQuery orderByRef($order = Criteria::ASC) Order by the ref column
* @method ChildMessageQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ChildMessageQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
* @method ChildMessageQuery orderByVersion($order = Criteria::ASC) Order by the version column
@@ -33,9 +32,8 @@ use Thelia\Model\Map\MessageTableMap;
* @method ChildMessageQuery orderByVersionCreatedBy($order = Criteria::ASC) Order by the version_created_by column
*
* @method ChildMessageQuery groupById() Group by the id column
- * @method ChildMessageQuery groupByCode() Group by the code column
+ * @method ChildMessageQuery groupByName() Group by the name column
* @method ChildMessageQuery groupBySecured() Group by the secured column
- * @method ChildMessageQuery groupByRef() Group by the ref column
* @method ChildMessageQuery groupByCreatedAt() Group by the created_at column
* @method ChildMessageQuery groupByUpdatedAt() Group by the updated_at column
* @method ChildMessageQuery groupByVersion() Group by the version column
@@ -58,9 +56,8 @@ use Thelia\Model\Map\MessageTableMap;
* @method ChildMessage findOneOrCreate(ConnectionInterface $con = null) Return the first ChildMessage matching the query, or a new ChildMessage object populated from the query conditions when no match is found
*
* @method ChildMessage findOneById(int $id) Return the first ChildMessage filtered by the id column
- * @method ChildMessage findOneByCode(string $code) Return the first ChildMessage filtered by the code column
+ * @method ChildMessage findOneByName(string $name) Return the first ChildMessage filtered by the name column
* @method ChildMessage findOneBySecured(int $secured) Return the first ChildMessage filtered by the secured column
- * @method ChildMessage findOneByRef(string $ref) Return the first ChildMessage filtered by the ref column
* @method ChildMessage findOneByCreatedAt(string $created_at) Return the first ChildMessage filtered by the created_at column
* @method ChildMessage findOneByUpdatedAt(string $updated_at) Return the first ChildMessage filtered by the updated_at column
* @method ChildMessage findOneByVersion(int $version) Return the first ChildMessage filtered by the version column
@@ -68,9 +65,8 @@ use Thelia\Model\Map\MessageTableMap;
* @method ChildMessage findOneByVersionCreatedBy(string $version_created_by) Return the first ChildMessage filtered by the version_created_by column
*
* @method array findById(int $id) Return ChildMessage objects filtered by the id column
- * @method array findByCode(string $code) Return ChildMessage objects filtered by the code column
+ * @method array findByName(string $name) Return ChildMessage objects filtered by the name column
* @method array findBySecured(int $secured) Return ChildMessage objects filtered by the secured column
- * @method array findByRef(string $ref) Return ChildMessage objects filtered by the ref column
* @method array findByCreatedAt(string $created_at) Return ChildMessage objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ChildMessage objects filtered by the updated_at column
* @method array findByVersion(int $version) Return ChildMessage objects filtered by the version column
@@ -171,7 +167,7 @@ abstract class MessageQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
- $sql = 'SELECT ID, CODE, SECURED, REF, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM message WHERE ID = :p0';
+ $sql = 'SELECT ID, NAME, SECURED, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM message WHERE ID = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -302,32 +298,32 @@ abstract class MessageQuery extends ModelCriteria
}
/**
- * Filter the query on the code column
+ * Filter the query on the name column
*
* Example usage:
*
- * $query->filterByCode('fooValue'); // WHERE code = 'fooValue'
- * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%'
+ * $query->filterByName('fooValue'); // WHERE name = 'fooValue'
+ * $query->filterByName('%fooValue%'); // WHERE name LIKE '%fooValue%'
*
*
- * @param string $code The value to use as filter.
+ * @param string $name 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 ChildMessageQuery The current query, for fluid interface
*/
- public function filterByCode($code = null, $comparison = null)
+ public function filterByName($name = null, $comparison = null)
{
if (null === $comparison) {
- if (is_array($code)) {
+ if (is_array($name)) {
$comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $code)) {
- $code = str_replace('*', '%', $code);
+ } elseif (preg_match('/[\%\*]/', $name)) {
+ $name = str_replace('*', '%', $name);
$comparison = Criteria::LIKE;
}
}
- return $this->addUsingAlias(MessageTableMap::CODE, $code, $comparison);
+ return $this->addUsingAlias(MessageTableMap::NAME, $name, $comparison);
}
/**
@@ -371,35 +367,6 @@ abstract class MessageQuery extends ModelCriteria
return $this->addUsingAlias(MessageTableMap::SECURED, $secured, $comparison);
}
- /**
- * Filter the query on the ref column
- *
- * Example usage:
- *
- * $query->filterByRef('fooValue'); // WHERE ref = 'fooValue'
- * $query->filterByRef('%fooValue%'); // WHERE ref LIKE '%fooValue%'
- *
- *
- * @param string $ref 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 ChildMessageQuery The current query, for fluid interface
- */
- public function filterByRef($ref = null, $comparison = null)
- {
- if (null === $comparison) {
- if (is_array($ref)) {
- $comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $ref)) {
- $ref = str_replace('*', '%', $ref);
- $comparison = Criteria::LIKE;
- }
- }
-
- return $this->addUsingAlias(MessageTableMap::REF, $ref, $comparison);
- }
-
/**
* Filter the query on the created_at column
*
@@ -913,7 +880,7 @@ abstract class MessageQuery extends ModelCriteria
*
* @return ChildMessageQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'MessageI18n';
@@ -931,7 +898,7 @@ abstract class MessageQuery extends ModelCriteria
*
* @return ChildMessageQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -952,7 +919,7 @@ abstract class MessageQuery extends ModelCriteria
*
* @return ChildMessageI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/MessageVersion.php b/core/lib/Thelia/Model/Base/MessageVersion.php
old mode 100755
new mode 100644
index 0781a503a..60e12da8d
--- a/core/lib/Thelia/Model/Base/MessageVersion.php
+++ b/core/lib/Thelia/Model/Base/MessageVersion.php
@@ -62,10 +62,10 @@ abstract class MessageVersion implements ActiveRecordInterface
protected $id;
/**
- * The value for the code field.
+ * The value for the name field.
* @var string
*/
- protected $code;
+ protected $name;
/**
* The value for the secured field.
@@ -73,12 +73,6 @@ abstract class MessageVersion implements ActiveRecordInterface
*/
protected $secured;
- /**
- * The value for the ref field.
- * @var string
- */
- protected $ref;
-
/**
* The value for the created_at field.
* @var string
@@ -292,7 +286,7 @@ abstract class MessageVersion implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -402,14 +396,14 @@ abstract class MessageVersion implements ActiveRecordInterface
}
/**
- * Get the [code] column value.
+ * Get the [name] column value.
*
* @return string
*/
- public function getCode()
+ public function getName()
{
- return $this->code;
+ return $this->name;
}
/**
@@ -423,17 +417,6 @@ abstract class MessageVersion implements ActiveRecordInterface
return $this->secured;
}
- /**
- * Get the [ref] column value.
- *
- * @return string
- */
- public function getRef()
- {
-
- return $this->ref;
- }
-
/**
* Get the [optionally formatted] temporal [created_at] column value.
*
@@ -542,25 +525,25 @@ abstract class MessageVersion implements ActiveRecordInterface
} // setId()
/**
- * Set the value of [code] column.
+ * Set the value of [name] column.
*
* @param string $v new value
* @return \Thelia\Model\MessageVersion The current object (for fluent API support)
*/
- public function setCode($v)
+ public function setName($v)
{
if ($v !== null) {
$v = (string) $v;
}
- if ($this->code !== $v) {
- $this->code = $v;
- $this->modifiedColumns[] = MessageVersionTableMap::CODE;
+ if ($this->name !== $v) {
+ $this->name = $v;
+ $this->modifiedColumns[] = MessageVersionTableMap::NAME;
}
return $this;
- } // setCode()
+ } // setName()
/**
* Set the value of [secured] column.
@@ -583,27 +566,6 @@ abstract class MessageVersion implements ActiveRecordInterface
return $this;
} // setSecured()
- /**
- * Set the value of [ref] column.
- *
- * @param string $v new value
- * @return \Thelia\Model\MessageVersion The current object (for fluent API support)
- */
- public function setRef($v)
- {
- if ($v !== null) {
- $v = (string) $v;
- }
-
- if ($this->ref !== $v) {
- $this->ref = $v;
- $this->modifiedColumns[] = MessageVersionTableMap::REF;
- }
-
-
- return $this;
- } // setRef()
-
/**
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
*
@@ -753,37 +715,34 @@ abstract class MessageVersion implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : MessageVersionTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
$this->id = (null !== $col) ? (int) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : MessageVersionTableMap::translateFieldName('Code', TableMap::TYPE_PHPNAME, $indexType)];
- $this->code = (null !== $col) ? (string) $col : null;
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : MessageVersionTableMap::translateFieldName('Name', TableMap::TYPE_PHPNAME, $indexType)];
+ $this->name = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : MessageVersionTableMap::translateFieldName('Secured', TableMap::TYPE_PHPNAME, $indexType)];
$this->secured = (null !== $col) ? (int) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageVersionTableMap::translateFieldName('Ref', TableMap::TYPE_PHPNAME, $indexType)];
- $this->ref = (null !== $col) ? (string) $col : null;
-
- $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageVersionTableMap::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 ? 5 + $startcol : MessageVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageVersionTableMap::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 ? 6 + $startcol : MessageVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : MessageVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
$this->version = (null !== $col) ? (int) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : MessageVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : MessageVersionTableMap::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 ? 8 + $startcol : MessageVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : MessageVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
$this->version_created_by = (null !== $col) ? (string) $col : null;
$this->resetModified();
@@ -793,7 +752,7 @@ abstract class MessageVersion implements ActiveRecordInterface
$this->ensureConsistency();
}
- return $startcol + 9; // 9 = MessageVersionTableMap::NUM_HYDRATE_COLUMNS.
+ return $startcol + 8; // 8 = MessageVersionTableMap::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating \Thelia\Model\MessageVersion object", 0, $e);
@@ -1017,15 +976,12 @@ abstract class MessageVersion implements ActiveRecordInterface
if ($this->isColumnModified(MessageVersionTableMap::ID)) {
$modifiedColumns[':p' . $index++] = 'ID';
}
- if ($this->isColumnModified(MessageVersionTableMap::CODE)) {
- $modifiedColumns[':p' . $index++] = 'CODE';
+ if ($this->isColumnModified(MessageVersionTableMap::NAME)) {
+ $modifiedColumns[':p' . $index++] = 'NAME';
}
if ($this->isColumnModified(MessageVersionTableMap::SECURED)) {
$modifiedColumns[':p' . $index++] = 'SECURED';
}
- if ($this->isColumnModified(MessageVersionTableMap::REF)) {
- $modifiedColumns[':p' . $index++] = 'REF';
- }
if ($this->isColumnModified(MessageVersionTableMap::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
}
@@ -1055,15 +1011,12 @@ abstract class MessageVersion implements ActiveRecordInterface
case 'ID':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
break;
- case 'CODE':
- $stmt->bindValue($identifier, $this->code, PDO::PARAM_STR);
+ case 'NAME':
+ $stmt->bindValue($identifier, $this->name, PDO::PARAM_STR);
break;
case 'SECURED':
$stmt->bindValue($identifier, $this->secured, PDO::PARAM_INT);
break;
- case 'REF':
- $stmt->bindValue($identifier, $this->ref, 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;
@@ -1138,27 +1091,24 @@ abstract class MessageVersion implements ActiveRecordInterface
return $this->getId();
break;
case 1:
- return $this->getCode();
+ return $this->getName();
break;
case 2:
return $this->getSecured();
break;
case 3:
- return $this->getRef();
- break;
- case 4:
return $this->getCreatedAt();
break;
- case 5:
+ case 4:
return $this->getUpdatedAt();
break;
- case 6:
+ case 5:
return $this->getVersion();
break;
- case 7:
+ case 6:
return $this->getVersionCreatedAt();
break;
- case 8:
+ case 7:
return $this->getVersionCreatedBy();
break;
default:
@@ -1191,14 +1141,13 @@ abstract class MessageVersion implements ActiveRecordInterface
$keys = MessageVersionTableMap::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getId(),
- $keys[1] => $this->getCode(),
+ $keys[1] => $this->getName(),
$keys[2] => $this->getSecured(),
- $keys[3] => $this->getRef(),
- $keys[4] => $this->getCreatedAt(),
- $keys[5] => $this->getUpdatedAt(),
- $keys[6] => $this->getVersion(),
- $keys[7] => $this->getVersionCreatedAt(),
- $keys[8] => $this->getVersionCreatedBy(),
+ $keys[3] => $this->getCreatedAt(),
+ $keys[4] => $this->getUpdatedAt(),
+ $keys[5] => $this->getVersion(),
+ $keys[6] => $this->getVersionCreatedAt(),
+ $keys[7] => $this->getVersionCreatedBy(),
);
$virtualColumns = $this->virtualColumns;
foreach($virtualColumns as $key => $virtualColumn)
@@ -1248,27 +1197,24 @@ abstract class MessageVersion implements ActiveRecordInterface
$this->setId($value);
break;
case 1:
- $this->setCode($value);
+ $this->setName($value);
break;
case 2:
$this->setSecured($value);
break;
case 3:
- $this->setRef($value);
- break;
- case 4:
$this->setCreatedAt($value);
break;
- case 5:
+ case 4:
$this->setUpdatedAt($value);
break;
- case 6:
+ case 5:
$this->setVersion($value);
break;
- case 7:
+ case 6:
$this->setVersionCreatedAt($value);
break;
- case 8:
+ case 7:
$this->setVersionCreatedBy($value);
break;
} // switch()
@@ -1296,14 +1242,13 @@ abstract class MessageVersion implements ActiveRecordInterface
$keys = MessageVersionTableMap::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
- if (array_key_exists($keys[1], $arr)) $this->setCode($arr[$keys[1]]);
+ if (array_key_exists($keys[1], $arr)) $this->setName($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setSecured($arr[$keys[2]]);
- if (array_key_exists($keys[3], $arr)) $this->setRef($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]]);
+ if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]);
+ if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]);
+ if (array_key_exists($keys[5], $arr)) $this->setVersion($arr[$keys[5]]);
+ if (array_key_exists($keys[6], $arr)) $this->setVersionCreatedAt($arr[$keys[6]]);
+ if (array_key_exists($keys[7], $arr)) $this->setVersionCreatedBy($arr[$keys[7]]);
}
/**
@@ -1316,9 +1261,8 @@ abstract class MessageVersion implements ActiveRecordInterface
$criteria = new Criteria(MessageVersionTableMap::DATABASE_NAME);
if ($this->isColumnModified(MessageVersionTableMap::ID)) $criteria->add(MessageVersionTableMap::ID, $this->id);
- if ($this->isColumnModified(MessageVersionTableMap::CODE)) $criteria->add(MessageVersionTableMap::CODE, $this->code);
+ if ($this->isColumnModified(MessageVersionTableMap::NAME)) $criteria->add(MessageVersionTableMap::NAME, $this->name);
if ($this->isColumnModified(MessageVersionTableMap::SECURED)) $criteria->add(MessageVersionTableMap::SECURED, $this->secured);
- if ($this->isColumnModified(MessageVersionTableMap::REF)) $criteria->add(MessageVersionTableMap::REF, $this->ref);
if ($this->isColumnModified(MessageVersionTableMap::CREATED_AT)) $criteria->add(MessageVersionTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(MessageVersionTableMap::UPDATED_AT)) $criteria->add(MessageVersionTableMap::UPDATED_AT, $this->updated_at);
if ($this->isColumnModified(MessageVersionTableMap::VERSION)) $criteria->add(MessageVersionTableMap::VERSION, $this->version);
@@ -1395,9 +1339,8 @@ abstract class MessageVersion implements ActiveRecordInterface
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
{
$copyObj->setId($this->getId());
- $copyObj->setCode($this->getCode());
+ $copyObj->setName($this->getName());
$copyObj->setSecured($this->getSecured());
- $copyObj->setRef($this->getRef());
$copyObj->setCreatedAt($this->getCreatedAt());
$copyObj->setUpdatedAt($this->getUpdatedAt());
$copyObj->setVersion($this->getVersion());
@@ -1487,9 +1430,8 @@ abstract class MessageVersion implements ActiveRecordInterface
public function clear()
{
$this->id = null;
- $this->code = null;
+ $this->name = null;
$this->secured = null;
- $this->ref = null;
$this->created_at = null;
$this->updated_at = null;
$this->version = null;
diff --git a/core/lib/Thelia/Model/Base/MessageVersionQuery.php b/core/lib/Thelia/Model/Base/MessageVersionQuery.php
old mode 100755
new mode 100644
index ac9b0ece0..088234eb5
--- a/core/lib/Thelia/Model/Base/MessageVersionQuery.php
+++ b/core/lib/Thelia/Model/Base/MessageVersionQuery.php
@@ -22,9 +22,8 @@ use Thelia\Model\Map\MessageVersionTableMap;
*
*
* @method ChildMessageVersionQuery orderById($order = Criteria::ASC) Order by the id column
- * @method ChildMessageVersionQuery orderByCode($order = Criteria::ASC) Order by the code column
+ * @method ChildMessageVersionQuery orderByName($order = Criteria::ASC) Order by the name column
* @method ChildMessageVersionQuery orderBySecured($order = Criteria::ASC) Order by the secured column
- * @method ChildMessageVersionQuery orderByRef($order = Criteria::ASC) Order by the ref column
* @method ChildMessageVersionQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ChildMessageVersionQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
* @method ChildMessageVersionQuery orderByVersion($order = Criteria::ASC) Order by the version column
@@ -32,9 +31,8 @@ use Thelia\Model\Map\MessageVersionTableMap;
* @method ChildMessageVersionQuery orderByVersionCreatedBy($order = Criteria::ASC) Order by the version_created_by column
*
* @method ChildMessageVersionQuery groupById() Group by the id column
- * @method ChildMessageVersionQuery groupByCode() Group by the code column
+ * @method ChildMessageVersionQuery groupByName() Group by the name column
* @method ChildMessageVersionQuery groupBySecured() Group by the secured column
- * @method ChildMessageVersionQuery groupByRef() Group by the ref column
* @method ChildMessageVersionQuery groupByCreatedAt() Group by the created_at column
* @method ChildMessageVersionQuery groupByUpdatedAt() Group by the updated_at column
* @method ChildMessageVersionQuery groupByVersion() Group by the version column
@@ -53,9 +51,8 @@ use Thelia\Model\Map\MessageVersionTableMap;
* @method ChildMessageVersion findOneOrCreate(ConnectionInterface $con = null) Return the first ChildMessageVersion matching the query, or a new ChildMessageVersion object populated from the query conditions when no match is found
*
* @method ChildMessageVersion findOneById(int $id) Return the first ChildMessageVersion filtered by the id column
- * @method ChildMessageVersion findOneByCode(string $code) Return the first ChildMessageVersion filtered by the code column
+ * @method ChildMessageVersion findOneByName(string $name) Return the first ChildMessageVersion filtered by the name column
* @method ChildMessageVersion findOneBySecured(int $secured) Return the first ChildMessageVersion filtered by the secured column
- * @method ChildMessageVersion findOneByRef(string $ref) Return the first ChildMessageVersion filtered by the ref column
* @method ChildMessageVersion findOneByCreatedAt(string $created_at) Return the first ChildMessageVersion filtered by the created_at column
* @method ChildMessageVersion findOneByUpdatedAt(string $updated_at) Return the first ChildMessageVersion filtered by the updated_at column
* @method ChildMessageVersion findOneByVersion(int $version) Return the first ChildMessageVersion filtered by the version column
@@ -63,9 +60,8 @@ use Thelia\Model\Map\MessageVersionTableMap;
* @method ChildMessageVersion findOneByVersionCreatedBy(string $version_created_by) Return the first ChildMessageVersion filtered by the version_created_by column
*
* @method array findById(int $id) Return ChildMessageVersion objects filtered by the id column
- * @method array findByCode(string $code) Return ChildMessageVersion objects filtered by the code column
+ * @method array findByName(string $name) Return ChildMessageVersion objects filtered by the name column
* @method array findBySecured(int $secured) Return ChildMessageVersion objects filtered by the secured column
- * @method array findByRef(string $ref) Return ChildMessageVersion objects filtered by the ref column
* @method array findByCreatedAt(string $created_at) Return ChildMessageVersion objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ChildMessageVersion objects filtered by the updated_at column
* @method array findByVersion(int $version) Return ChildMessageVersion objects filtered by the version column
@@ -159,7 +155,7 @@ abstract class MessageVersionQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
- $sql = 'SELECT ID, CODE, SECURED, REF, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM message_version WHERE ID = :p0 AND VERSION = :p1';
+ $sql = 'SELECT ID, NAME, SECURED, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM message_version WHERE ID = :p0 AND VERSION = :p1';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
@@ -304,32 +300,32 @@ abstract class MessageVersionQuery extends ModelCriteria
}
/**
- * Filter the query on the code column
+ * Filter the query on the name column
*
* Example usage:
*
- * $query->filterByCode('fooValue'); // WHERE code = 'fooValue'
- * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%'
+ * $query->filterByName('fooValue'); // WHERE name = 'fooValue'
+ * $query->filterByName('%fooValue%'); // WHERE name LIKE '%fooValue%'
*
*
- * @param string $code The value to use as filter.
+ * @param string $name 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 ChildMessageVersionQuery The current query, for fluid interface
*/
- public function filterByCode($code = null, $comparison = null)
+ public function filterByName($name = null, $comparison = null)
{
if (null === $comparison) {
- if (is_array($code)) {
+ if (is_array($name)) {
$comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $code)) {
- $code = str_replace('*', '%', $code);
+ } elseif (preg_match('/[\%\*]/', $name)) {
+ $name = str_replace('*', '%', $name);
$comparison = Criteria::LIKE;
}
}
- return $this->addUsingAlias(MessageVersionTableMap::CODE, $code, $comparison);
+ return $this->addUsingAlias(MessageVersionTableMap::NAME, $name, $comparison);
}
/**
@@ -373,35 +369,6 @@ abstract class MessageVersionQuery extends ModelCriteria
return $this->addUsingAlias(MessageVersionTableMap::SECURED, $secured, $comparison);
}
- /**
- * Filter the query on the ref column
- *
- * Example usage:
- *
- * $query->filterByRef('fooValue'); // WHERE ref = 'fooValue'
- * $query->filterByRef('%fooValue%'); // WHERE ref LIKE '%fooValue%'
- *
- *
- * @param string $ref 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 ChildMessageVersionQuery The current query, for fluid interface
- */
- public function filterByRef($ref = null, $comparison = null)
- {
- if (null === $comparison) {
- if (is_array($ref)) {
- $comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $ref)) {
- $ref = str_replace('*', '%', $ref);
- $comparison = Criteria::LIKE;
- }
- }
-
- return $this->addUsingAlias(MessageVersionTableMap::REF, $ref, $comparison);
- }
-
/**
* Filter the query on the created_at column
*
diff --git a/core/lib/Thelia/Model/Base/Module.php b/core/lib/Thelia/Model/Base/Module.php
old mode 100755
new mode 100644
index ebe4b4c18..556ef9ff6
--- a/core/lib/Thelia/Model/Base/Module.php
+++ b/core/lib/Thelia/Model/Base/Module.php
@@ -127,7 +127,7 @@ abstract class Module implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -303,7 +303,7 @@ abstract class Module implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -1910,7 +1910,7 @@ abstract class Module implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collGroupModules instanceof Collection) {
@@ -1956,7 +1956,7 @@ abstract class Module implements ActiveRecordInterface
*
* @return ChildModule The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -1980,7 +1980,7 @@ abstract class Module implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildModuleI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collModuleI18ns) {
@@ -2015,7 +2015,7 @@ abstract class Module implements ActiveRecordInterface
*
* @return ChildModule The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildModuleI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/ModuleI18n.php b/core/lib/Thelia/Model/Base/ModuleI18n.php
old mode 100755
new mode 100644
index 54cf305e4..9c7d603d1
--- a/core/lib/Thelia/Model/Base/ModuleI18n.php
+++ b/core/lib/Thelia/Model/Base/ModuleI18n.php
@@ -61,7 +61,7 @@ abstract class ModuleI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -111,7 +111,7 @@ abstract class ModuleI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -272,7 +272,7 @@ abstract class ModuleI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -576,7 +576,7 @@ abstract class ModuleI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/ModuleI18nQuery.php b/core/lib/Thelia/Model/Base/ModuleI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/ModuleQuery.php b/core/lib/Thelia/Model/Base/ModuleQuery.php
old mode 100755
new mode 100644
index 7db21ca22..e1bd9de68
--- a/core/lib/Thelia/Model/Base/ModuleQuery.php
+++ b/core/lib/Thelia/Model/Base/ModuleQuery.php
@@ -838,7 +838,7 @@ abstract class ModuleQuery extends ModelCriteria
*
* @return ChildModuleQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'ModuleI18n';
@@ -856,7 +856,7 @@ abstract class ModuleQuery extends ModelCriteria
*
* @return ChildModuleQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -877,7 +877,7 @@ abstract class ModuleQuery extends ModelCriteria
*
* @return ChildModuleI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/Order.php b/core/lib/Thelia/Model/Base/Order.php
old mode 100755
new mode 100644
index ccf7922f3..6932ec6c4
--- a/core/lib/Thelia/Model/Base/Order.php
+++ b/core/lib/Thelia/Model/Base/Order.php
@@ -388,7 +388,7 @@ abstract class Order implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -2842,31 +2842,6 @@ abstract class Order implements ActiveRecordInterface
return $this;
}
-
- /**
- * If this collection has already been initialized with
- * an identical criteria, it returns the collection.
- * Otherwise if this Order is new, it will return
- * an empty collection; or if this Order has previously
- * been saved, it will retrieve related CouponOrders from storage.
- *
- * This method is protected by default in order to keep the public
- * api reasonable. You can provide public methods for those you
- * actually need in Order.
- *
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param ConnectionInterface $con optional connection object
- * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
- * @return Collection|ChildCouponOrder[] List of ChildCouponOrder objects
- */
- public function getCouponOrdersJoinCoupon($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
- {
- $query = ChildCouponOrderQuery::create(null, $criteria);
- $query->joinWith('Coupon', $joinBehavior);
-
- return $this->getCouponOrders($query, $con);
- }
-
/**
* Clears the current object and sets all attributes to their default values
*/
diff --git a/core/lib/Thelia/Model/Base/OrderAddress.php b/core/lib/Thelia/Model/Base/OrderAddress.php
old mode 100755
new mode 100644
index b5ff32951..d0220d4e0
--- a/core/lib/Thelia/Model/Base/OrderAddress.php
+++ b/core/lib/Thelia/Model/Base/OrderAddress.php
@@ -329,7 +329,7 @@ abstract class OrderAddress implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/OrderAddressQuery.php b/core/lib/Thelia/Model/Base/OrderAddressQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/OrderFeature.php b/core/lib/Thelia/Model/Base/OrderFeature.php
old mode 100755
new mode 100644
index 49c1a0911..e2b52e6b1
--- a/core/lib/Thelia/Model/Base/OrderFeature.php
+++ b/core/lib/Thelia/Model/Base/OrderFeature.php
@@ -261,7 +261,7 @@ abstract class OrderFeature implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/OrderFeatureQuery.php b/core/lib/Thelia/Model/Base/OrderFeatureQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/OrderProduct.php b/core/lib/Thelia/Model/Base/OrderProduct.php
old mode 100755
new mode 100644
index b448e4e0c..2bf9c7ace
--- a/core/lib/Thelia/Model/Base/OrderProduct.php
+++ b/core/lib/Thelia/Model/Base/OrderProduct.php
@@ -312,7 +312,7 @@ abstract class OrderProduct implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/OrderProductQuery.php b/core/lib/Thelia/Model/Base/OrderProductQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/OrderQuery.php b/core/lib/Thelia/Model/Base/OrderQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/OrderStatus.php b/core/lib/Thelia/Model/Base/OrderStatus.php
old mode 100755
new mode 100644
index 15ce7fbf7..d249b4865
--- a/core/lib/Thelia/Model/Base/OrderStatus.php
+++ b/core/lib/Thelia/Model/Base/OrderStatus.php
@@ -109,7 +109,7 @@ abstract class OrderStatus implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -285,7 +285,7 @@ abstract class OrderStatus implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -1812,7 +1812,7 @@ abstract class OrderStatus implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collOrders instanceof Collection) {
@@ -1858,7 +1858,7 @@ abstract class OrderStatus implements ActiveRecordInterface
*
* @return ChildOrderStatus The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -1882,7 +1882,7 @@ abstract class OrderStatus implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildOrderStatusI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collOrderStatusI18ns) {
@@ -1917,7 +1917,7 @@ abstract class OrderStatus implements ActiveRecordInterface
*
* @return ChildOrderStatus The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildOrderStatusI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/OrderStatusI18n.php b/core/lib/Thelia/Model/Base/OrderStatusI18n.php
old mode 100755
new mode 100644
index 1f98739f0..2946cc55b
--- a/core/lib/Thelia/Model/Base/OrderStatusI18n.php
+++ b/core/lib/Thelia/Model/Base/OrderStatusI18n.php
@@ -61,7 +61,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -111,7 +111,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -272,7 +272,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -576,7 +576,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/OrderStatusI18nQuery.php b/core/lib/Thelia/Model/Base/OrderStatusI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/OrderStatusQuery.php b/core/lib/Thelia/Model/Base/OrderStatusQuery.php
old mode 100755
new mode 100644
index 07fcdb8dc..908efd6b6
--- a/core/lib/Thelia/Model/Base/OrderStatusQuery.php
+++ b/core/lib/Thelia/Model/Base/OrderStatusQuery.php
@@ -703,7 +703,7 @@ abstract class OrderStatusQuery extends ModelCriteria
*
* @return ChildOrderStatusQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'OrderStatusI18n';
@@ -721,7 +721,7 @@ abstract class OrderStatusQuery extends ModelCriteria
*
* @return ChildOrderStatusQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -742,7 +742,7 @@ abstract class OrderStatusQuery extends ModelCriteria
*
* @return ChildOrderStatusI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/Product.php b/core/lib/Thelia/Model/Base/Product.php
old mode 100755
new mode 100644
index ce2e2a645..f7457d47b
--- a/core/lib/Thelia/Model/Base/Product.php
+++ b/core/lib/Thelia/Model/Base/Product.php
@@ -242,7 +242,7 @@ abstract class Product implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -512,7 +512,7 @@ abstract class Product implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -5447,7 +5447,7 @@ abstract class Product implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collProductCategories instanceof Collection) {
@@ -5542,7 +5542,7 @@ abstract class Product implements ActiveRecordInterface
*
* @return ChildProduct The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -5566,7 +5566,7 @@ abstract class Product implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildProductI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collProductI18ns) {
@@ -5601,7 +5601,7 @@ abstract class Product implements ActiveRecordInterface
*
* @return ChildProduct The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildProductI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/ProductAssociatedContent.php b/core/lib/Thelia/Model/Base/ProductAssociatedContent.php
index 6dce2b2c3..bbc97d5d1 100644
--- a/core/lib/Thelia/Model/Base/ProductAssociatedContent.php
+++ b/core/lib/Thelia/Model/Base/ProductAssociatedContent.php
@@ -268,7 +268,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/ProductCategory.php b/core/lib/Thelia/Model/Base/ProductCategory.php
old mode 100755
new mode 100644
index 74affb0c0..62a6ea425
--- a/core/lib/Thelia/Model/Base/ProductCategory.php
+++ b/core/lib/Thelia/Model/Base/ProductCategory.php
@@ -256,7 +256,7 @@ abstract class ProductCategory implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/ProductCategoryQuery.php b/core/lib/Thelia/Model/Base/ProductCategoryQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/ProductDocument.php b/core/lib/Thelia/Model/Base/ProductDocument.php
old mode 100755
new mode 100644
index 16503b9fb..4223679c1
--- a/core/lib/Thelia/Model/Base/ProductDocument.php
+++ b/core/lib/Thelia/Model/Base/ProductDocument.php
@@ -120,7 +120,7 @@ abstract class ProductDocument implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -290,7 +290,7 @@ abstract class ProductDocument implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -1640,7 +1640,7 @@ abstract class ProductDocument implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collProductDocumentI18ns instanceof Collection) {
@@ -1683,7 +1683,7 @@ abstract class ProductDocument implements ActiveRecordInterface
*
* @return ChildProductDocument The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -1707,7 +1707,7 @@ abstract class ProductDocument implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildProductDocumentI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collProductDocumentI18ns) {
@@ -1742,7 +1742,7 @@ abstract class ProductDocument implements ActiveRecordInterface
*
* @return ChildProductDocument The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildProductDocumentI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/ProductDocumentI18n.php b/core/lib/Thelia/Model/Base/ProductDocumentI18n.php
old mode 100755
new mode 100644
index f6c8436f8..1a6017966
--- a/core/lib/Thelia/Model/Base/ProductDocumentI18n.php
+++ b/core/lib/Thelia/Model/Base/ProductDocumentI18n.php
@@ -61,7 +61,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -111,7 +111,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -272,7 +272,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -576,7 +576,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/ProductDocumentI18nQuery.php b/core/lib/Thelia/Model/Base/ProductDocumentI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/ProductDocumentQuery.php b/core/lib/Thelia/Model/Base/ProductDocumentQuery.php
old mode 100755
new mode 100644
index 32321554d..06af05a9c
--- a/core/lib/Thelia/Model/Base/ProductDocumentQuery.php
+++ b/core/lib/Thelia/Model/Base/ProductDocumentQuery.php
@@ -797,7 +797,7 @@ abstract class ProductDocumentQuery extends ModelCriteria
*
* @return ChildProductDocumentQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'ProductDocumentI18n';
@@ -815,7 +815,7 @@ abstract class ProductDocumentQuery extends ModelCriteria
*
* @return ChildProductDocumentQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -836,7 +836,7 @@ abstract class ProductDocumentQuery extends ModelCriteria
*
* @return ChildProductDocumentI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/ProductI18n.php b/core/lib/Thelia/Model/Base/ProductI18n.php
old mode 100755
new mode 100644
index 7b6e65976..3ef14e787
--- a/core/lib/Thelia/Model/Base/ProductI18n.php
+++ b/core/lib/Thelia/Model/Base/ProductI18n.php
@@ -61,7 +61,7 @@ abstract class ProductI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -111,7 +111,7 @@ abstract class ProductI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -272,7 +272,7 @@ abstract class ProductI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -576,7 +576,7 @@ abstract class ProductI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/ProductI18nQuery.php b/core/lib/Thelia/Model/Base/ProductI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/ProductImage.php b/core/lib/Thelia/Model/Base/ProductImage.php
old mode 100755
new mode 100644
index 364e6f00b..a54d22cd0
--- a/core/lib/Thelia/Model/Base/ProductImage.php
+++ b/core/lib/Thelia/Model/Base/ProductImage.php
@@ -120,7 +120,7 @@ abstract class ProductImage implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -290,7 +290,7 @@ abstract class ProductImage implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -1640,7 +1640,7 @@ abstract class ProductImage implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collProductImageI18ns instanceof Collection) {
@@ -1683,7 +1683,7 @@ abstract class ProductImage implements ActiveRecordInterface
*
* @return ChildProductImage The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -1707,7 +1707,7 @@ abstract class ProductImage implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildProductImageI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collProductImageI18ns) {
@@ -1742,7 +1742,7 @@ abstract class ProductImage implements ActiveRecordInterface
*
* @return ChildProductImage The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildProductImageI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/ProductImageI18n.php b/core/lib/Thelia/Model/Base/ProductImageI18n.php
old mode 100755
new mode 100644
index 064f09986..679ded79c
--- a/core/lib/Thelia/Model/Base/ProductImageI18n.php
+++ b/core/lib/Thelia/Model/Base/ProductImageI18n.php
@@ -61,7 +61,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -111,7 +111,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -272,7 +272,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -576,7 +576,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/ProductImageI18nQuery.php b/core/lib/Thelia/Model/Base/ProductImageI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/ProductImageQuery.php b/core/lib/Thelia/Model/Base/ProductImageQuery.php
old mode 100755
new mode 100644
index e351c6f40..94cb1b361
--- a/core/lib/Thelia/Model/Base/ProductImageQuery.php
+++ b/core/lib/Thelia/Model/Base/ProductImageQuery.php
@@ -797,7 +797,7 @@ abstract class ProductImageQuery extends ModelCriteria
*
* @return ChildProductImageQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'ProductImageI18n';
@@ -815,7 +815,7 @@ abstract class ProductImageQuery extends ModelCriteria
*
* @return ChildProductImageQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -836,7 +836,7 @@ abstract class ProductImageQuery extends ModelCriteria
*
* @return ChildProductImageI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/ProductPrice.php b/core/lib/Thelia/Model/Base/ProductPrice.php
old mode 100755
new mode 100644
index dab6e47a4..15502a385
--- a/core/lib/Thelia/Model/Base/ProductPrice.php
+++ b/core/lib/Thelia/Model/Base/ProductPrice.php
@@ -274,7 +274,7 @@ abstract class ProductPrice implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/ProductPriceQuery.php b/core/lib/Thelia/Model/Base/ProductPriceQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/ProductQuery.php b/core/lib/Thelia/Model/Base/ProductQuery.php
old mode 100755
new mode 100644
index 3254bb08b..75f05dfcf
--- a/core/lib/Thelia/Model/Base/ProductQuery.php
+++ b/core/lib/Thelia/Model/Base/ProductQuery.php
@@ -1795,7 +1795,7 @@ abstract class ProductQuery extends ModelCriteria
*
* @return ChildProductQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'ProductI18n';
@@ -1813,7 +1813,7 @@ abstract class ProductQuery extends ModelCriteria
*
* @return ChildProductQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -1834,7 +1834,7 @@ abstract class ProductQuery extends ModelCriteria
*
* @return ChildProductI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/ProductSaleElements.php b/core/lib/Thelia/Model/Base/ProductSaleElements.php
old mode 100755
new mode 100644
index 22a8c9752..f79d9a246
--- a/core/lib/Thelia/Model/Base/ProductSaleElements.php
+++ b/core/lib/Thelia/Model/Base/ProductSaleElements.php
@@ -332,7 +332,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/ProductSaleElementsQuery.php b/core/lib/Thelia/Model/Base/ProductSaleElementsQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/ProductVersion.php b/core/lib/Thelia/Model/Base/ProductVersion.php
old mode 100755
new mode 100644
index 1779cee20..071dfc742
--- a/core/lib/Thelia/Model/Base/ProductVersion.php
+++ b/core/lib/Thelia/Model/Base/ProductVersion.php
@@ -300,7 +300,7 @@ abstract class ProductVersion implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/ProductVersionQuery.php b/core/lib/Thelia/Model/Base/ProductVersionQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/Resource.php b/core/lib/Thelia/Model/Base/Resource.php
old mode 100755
new mode 100644
index 827de2643..5a51bdc29
--- a/core/lib/Thelia/Model/Base/Resource.php
+++ b/core/lib/Thelia/Model/Base/Resource.php
@@ -116,7 +116,7 @@ abstract class Resource implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -298,7 +298,7 @@ abstract class Resource implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -1968,7 +1968,7 @@ abstract class Resource implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collGroupResources instanceof Collection) {
@@ -2018,7 +2018,7 @@ abstract class Resource implements ActiveRecordInterface
*
* @return ChildResource The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -2042,7 +2042,7 @@ abstract class Resource implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildResourceI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collResourceI18ns) {
@@ -2077,7 +2077,7 @@ abstract class Resource implements ActiveRecordInterface
*
* @return ChildResource The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildResourceI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/ResourceI18n.php b/core/lib/Thelia/Model/Base/ResourceI18n.php
old mode 100755
new mode 100644
index b740bd858..ac9ca106f
--- a/core/lib/Thelia/Model/Base/ResourceI18n.php
+++ b/core/lib/Thelia/Model/Base/ResourceI18n.php
@@ -61,7 +61,7 @@ abstract class ResourceI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -111,7 +111,7 @@ abstract class ResourceI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -272,7 +272,7 @@ abstract class ResourceI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -576,7 +576,7 @@ abstract class ResourceI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/ResourceI18nQuery.php b/core/lib/Thelia/Model/Base/ResourceI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/ResourceQuery.php b/core/lib/Thelia/Model/Base/ResourceQuery.php
old mode 100755
new mode 100644
index e12ee8f53..6559d6522
--- a/core/lib/Thelia/Model/Base/ResourceQuery.php
+++ b/core/lib/Thelia/Model/Base/ResourceQuery.php
@@ -720,7 +720,7 @@ abstract class ResourceQuery extends ModelCriteria
*
* @return ChildResourceQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'ResourceI18n';
@@ -738,7 +738,7 @@ abstract class ResourceQuery extends ModelCriteria
*
* @return ChildResourceQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -759,7 +759,7 @@ abstract class ResourceQuery extends ModelCriteria
*
* @return ChildResourceI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/RewritingArgument.php b/core/lib/Thelia/Model/Base/RewritingArgument.php
index e8a3a9a16..45f26c24f 100644
--- a/core/lib/Thelia/Model/Base/RewritingArgument.php
+++ b/core/lib/Thelia/Model/Base/RewritingArgument.php
@@ -255,7 +255,7 @@ abstract class RewritingArgument implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/RewritingUrl.php b/core/lib/Thelia/Model/Base/RewritingUrl.php
index a6bcd3a26..75ee97e79 100644
--- a/core/lib/Thelia/Model/Base/RewritingUrl.php
+++ b/core/lib/Thelia/Model/Base/RewritingUrl.php
@@ -298,7 +298,7 @@ abstract class RewritingUrl implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/Tax.php b/core/lib/Thelia/Model/Base/Tax.php
old mode 100755
new mode 100644
index f3717366f..02e6bc3b0
--- a/core/lib/Thelia/Model/Base/Tax.php
+++ b/core/lib/Thelia/Model/Base/Tax.php
@@ -109,7 +109,7 @@ abstract class Tax implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -285,7 +285,7 @@ abstract class Tax implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -1762,7 +1762,7 @@ abstract class Tax implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collTaxRuleCountries instanceof Collection) {
@@ -1808,7 +1808,7 @@ abstract class Tax implements ActiveRecordInterface
*
* @return ChildTax The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -1832,7 +1832,7 @@ abstract class Tax implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildTaxI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collTaxI18ns) {
@@ -1867,7 +1867,7 @@ abstract class Tax implements ActiveRecordInterface
*
* @return ChildTax The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildTaxI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/TaxI18n.php b/core/lib/Thelia/Model/Base/TaxI18n.php
old mode 100755
new mode 100644
index 8fdec086d..abb659135
--- a/core/lib/Thelia/Model/Base/TaxI18n.php
+++ b/core/lib/Thelia/Model/Base/TaxI18n.php
@@ -61,7 +61,7 @@ abstract class TaxI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -99,7 +99,7 @@ abstract class TaxI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -260,7 +260,7 @@ abstract class TaxI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -500,7 +500,7 @@ abstract class TaxI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/TaxI18nQuery.php b/core/lib/Thelia/Model/Base/TaxI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/TaxQuery.php b/core/lib/Thelia/Model/Base/TaxQuery.php
old mode 100755
new mode 100644
index 0a61cbb3c..307ace57c
--- a/core/lib/Thelia/Model/Base/TaxQuery.php
+++ b/core/lib/Thelia/Model/Base/TaxQuery.php
@@ -715,7 +715,7 @@ abstract class TaxQuery extends ModelCriteria
*
* @return ChildTaxQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'TaxI18n';
@@ -733,7 +733,7 @@ abstract class TaxQuery extends ModelCriteria
*
* @return ChildTaxQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -754,7 +754,7 @@ abstract class TaxQuery extends ModelCriteria
*
* @return ChildTaxI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Base/TaxRule.php b/core/lib/Thelia/Model/Base/TaxRule.php
old mode 100755
new mode 100644
index 101471313..d33d47e2b
--- a/core/lib/Thelia/Model/Base/TaxRule.php
+++ b/core/lib/Thelia/Model/Base/TaxRule.php
@@ -129,7 +129,7 @@ abstract class TaxRule implements ActiveRecordInterface
* Current locale
* @var string
*/
- protected $currentLocale = 'en_EN';
+ protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -311,7 +311,7 @@ abstract class TaxRule implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -2146,7 +2146,7 @@ abstract class TaxRule implements ActiveRecordInterface
} // if ($deep)
// i18n behavior
- $this->currentLocale = 'en_EN';
+ $this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collProducts instanceof Collection) {
@@ -2196,7 +2196,7 @@ abstract class TaxRule implements ActiveRecordInterface
*
* @return ChildTaxRule The current object (for fluent API support)
*/
- public function setLocale($locale = 'en_EN')
+ public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -2220,7 +2220,7 @@ abstract class TaxRule implements ActiveRecordInterface
* @param ConnectionInterface $con an optional connection object
*
* @return ChildTaxRuleI18n */
- public function getTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collTaxRuleI18ns) {
@@ -2255,7 +2255,7 @@ abstract class TaxRule implements ActiveRecordInterface
*
* @return ChildTaxRule The current object (for fluent API support)
*/
- public function removeTranslation($locale = 'en_EN', ConnectionInterface $con = null)
+ public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null)
{
if (!$this->isNew()) {
ChildTaxRuleI18nQuery::create()
diff --git a/core/lib/Thelia/Model/Base/TaxRuleCountry.php b/core/lib/Thelia/Model/Base/TaxRuleCountry.php
old mode 100755
new mode 100644
index b5ae7941b..66f6f585b
--- a/core/lib/Thelia/Model/Base/TaxRuleCountry.php
+++ b/core/lib/Thelia/Model/Base/TaxRuleCountry.php
@@ -281,7 +281,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
diff --git a/core/lib/Thelia/Model/Base/TaxRuleCountryQuery.php b/core/lib/Thelia/Model/Base/TaxRuleCountryQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/TaxRuleI18n.php b/core/lib/Thelia/Model/Base/TaxRuleI18n.php
old mode 100755
new mode 100644
index 86215b335..b1efadd6a
--- a/core/lib/Thelia/Model/Base/TaxRuleI18n.php
+++ b/core/lib/Thelia/Model/Base/TaxRuleI18n.php
@@ -61,7 +61,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface
/**
* The value for the locale field.
- * Note: this column has a database default value of: 'en_EN'
+ * Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -87,7 +87,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface
*/
public function applyDefaultValues()
{
- $this->locale = 'en_EN';
+ $this->locale = 'en_US';
}
/**
@@ -248,7 +248,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface
*/
public function hasVirtualColumn($name)
{
- return isset($this->virtualColumns[$name]);
+ return array_key_exists($name, $this->virtualColumns);
}
/**
@@ -424,7 +424,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
- if ($this->locale !== 'en_EN') {
+ if ($this->locale !== 'en_US') {
return false;
}
diff --git a/core/lib/Thelia/Model/Base/TaxRuleI18nQuery.php b/core/lib/Thelia/Model/Base/TaxRuleI18nQuery.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Base/TaxRuleQuery.php b/core/lib/Thelia/Model/Base/TaxRuleQuery.php
old mode 100755
new mode 100644
index 36f2edd99..2fb478b7a
--- a/core/lib/Thelia/Model/Base/TaxRuleQuery.php
+++ b/core/lib/Thelia/Model/Base/TaxRuleQuery.php
@@ -846,7 +846,7 @@ abstract class TaxRuleQuery extends ModelCriteria
*
* @return ChildTaxRuleQuery The current query, for fluid interface
*/
- public function joinI18n($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$relationName = $relationAlias ? $relationAlias : 'TaxRuleI18n';
@@ -864,7 +864,7 @@ abstract class TaxRuleQuery extends ModelCriteria
*
* @return ChildTaxRuleQuery The current query, for fluid interface
*/
- public function joinWithI18n($locale = 'en_EN', $joinType = Criteria::LEFT_JOIN)
+ public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
{
$this
->joinI18n($locale, null, $joinType)
@@ -885,7 +885,7 @@ abstract class TaxRuleQuery extends ModelCriteria
*
* @return ChildTaxRuleI18nQuery A secondary query class using the current class as primary query
*/
- public function useI18nQuery($locale = 'en_EN', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
+ public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinI18n($locale, $relationAlias, $joinType)
diff --git a/core/lib/Thelia/Model/Category.php b/core/lib/Thelia/Model/Category.php
index ac3b2fff6..ae999ccc8 100755
--- a/core/lib/Thelia/Model/Category.php
+++ b/core/lib/Thelia/Model/Category.php
@@ -2,6 +2,7 @@
namespace Thelia\Model;
+use Thelia\Core\Event\CategoryEvent;
use Thelia\Model\Base\Category as BaseCategory;
use Propel\Runtime\ActiveQuery\Criteria;
use Thelia\Tools\URL;
diff --git a/core/lib/Thelia/Model/Map/AccessoryTableMap.php b/core/lib/Thelia/Model/Map/AccessoryTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/AddressTableMap.php b/core/lib/Thelia/Model/Map/AddressTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/AdminGroupTableMap.php b/core/lib/Thelia/Model/Map/AdminGroupTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/AdminLogTableMap.php b/core/lib/Thelia/Model/Map/AdminLogTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/AdminTableMap.php b/core/lib/Thelia/Model/Map/AdminTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/AreaTableMap.php b/core/lib/Thelia/Model/Map/AreaTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/AttributeAvI18nTableMap.php b/core/lib/Thelia/Model/Map/AttributeAvI18nTableMap.php
old mode 100755
new mode 100644
index 14fc79eeb..02a20540e
--- a/core/lib/Thelia/Model/Map/AttributeAvI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/AttributeAvI18nTableMap.php
@@ -151,7 +151,7 @@ class AttributeAvI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'attribute_av', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/AttributeAvTableMap.php b/core/lib/Thelia/Model/Map/AttributeAvTableMap.php
old mode 100755
new mode 100644
index 138f0fa9c..0c5c2e1c9
--- a/core/lib/Thelia/Model/Map/AttributeAvTableMap.php
+++ b/core/lib/Thelia/Model/Map/AttributeAvTableMap.php
@@ -106,7 +106,7 @@ class AttributeAvTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/AttributeCategoryTableMap.php b/core/lib/Thelia/Model/Map/AttributeCategoryTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/AttributeCombinationTableMap.php b/core/lib/Thelia/Model/Map/AttributeCombinationTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/AttributeI18nTableMap.php b/core/lib/Thelia/Model/Map/AttributeI18nTableMap.php
old mode 100755
new mode 100644
index b60cae5b8..8471d3e26
--- a/core/lib/Thelia/Model/Map/AttributeI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/AttributeI18nTableMap.php
@@ -151,7 +151,7 @@ class AttributeI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'attribute', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/AttributeTableMap.php b/core/lib/Thelia/Model/Map/AttributeTableMap.php
old mode 100755
new mode 100644
index dca811cbc..773e13cab
--- a/core/lib/Thelia/Model/Map/AttributeTableMap.php
+++ b/core/lib/Thelia/Model/Map/AttributeTableMap.php
@@ -101,7 +101,7 @@ class AttributeTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/CartItemTableMap.php b/core/lib/Thelia/Model/Map/CartItemTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/CartTableMap.php b/core/lib/Thelia/Model/Map/CartTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/CategoryDocumentI18nTableMap.php b/core/lib/Thelia/Model/Map/CategoryDocumentI18nTableMap.php
old mode 100755
new mode 100644
index 1ad7dfe2f..956afae4a
--- a/core/lib/Thelia/Model/Map/CategoryDocumentI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/CategoryDocumentI18nTableMap.php
@@ -151,7 +151,7 @@ class CategoryDocumentI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'category_document', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/CategoryDocumentTableMap.php b/core/lib/Thelia/Model/Map/CategoryDocumentTableMap.php
old mode 100755
new mode 100644
index 83e748a1e..8b307ea1e
--- a/core/lib/Thelia/Model/Map/CategoryDocumentTableMap.php
+++ b/core/lib/Thelia/Model/Map/CategoryDocumentTableMap.php
@@ -111,7 +111,7 @@ class CategoryDocumentTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/CategoryI18nTableMap.php b/core/lib/Thelia/Model/Map/CategoryI18nTableMap.php
old mode 100755
new mode 100644
index 1611b2ebf..8c52aa7b2
--- a/core/lib/Thelia/Model/Map/CategoryI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/CategoryI18nTableMap.php
@@ -151,7 +151,7 @@ class CategoryI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'category', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/CategoryImageI18nTableMap.php b/core/lib/Thelia/Model/Map/CategoryImageI18nTableMap.php
old mode 100755
new mode 100644
index 1c59c9db2..1d27e16ad
--- a/core/lib/Thelia/Model/Map/CategoryImageI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/CategoryImageI18nTableMap.php
@@ -151,7 +151,7 @@ class CategoryImageI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'category_image', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/CategoryImageTableMap.php b/core/lib/Thelia/Model/Map/CategoryImageTableMap.php
old mode 100755
new mode 100644
index 9eafe2ade..1c7694d05
--- a/core/lib/Thelia/Model/Map/CategoryImageTableMap.php
+++ b/core/lib/Thelia/Model/Map/CategoryImageTableMap.php
@@ -111,7 +111,7 @@ class CategoryImageTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/CategoryTableMap.php b/core/lib/Thelia/Model/Map/CategoryTableMap.php
old mode 100755
new mode 100644
index 5e692c00f..6a2d052a1
--- a/core/lib/Thelia/Model/Map/CategoryTableMap.php
+++ b/core/lib/Thelia/Model/Map/CategoryTableMap.php
@@ -126,7 +126,7 @@ class CategoryTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/CategoryVersionTableMap.php b/core/lib/Thelia/Model/Map/CategoryVersionTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/ConfigI18nTableMap.php b/core/lib/Thelia/Model/Map/ConfigI18nTableMap.php
old mode 100755
new mode 100644
index a83f87b76..b953b0ac9
--- a/core/lib/Thelia/Model/Map/ConfigI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/ConfigI18nTableMap.php
@@ -151,7 +151,7 @@ class ConfigI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'config', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/ConfigTableMap.php b/core/lib/Thelia/Model/Map/ConfigTableMap.php
old mode 100755
new mode 100644
index 8bd68a964..ebd5d6edf
--- a/core/lib/Thelia/Model/Map/ConfigTableMap.php
+++ b/core/lib/Thelia/Model/Map/ConfigTableMap.php
@@ -116,7 +116,7 @@ class ConfigTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/ContentDocumentI18nTableMap.php b/core/lib/Thelia/Model/Map/ContentDocumentI18nTableMap.php
old mode 100755
new mode 100644
index a6ff890d7..7ebde93e6
--- a/core/lib/Thelia/Model/Map/ContentDocumentI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/ContentDocumentI18nTableMap.php
@@ -151,7 +151,7 @@ class ContentDocumentI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'content_document', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/ContentDocumentTableMap.php b/core/lib/Thelia/Model/Map/ContentDocumentTableMap.php
old mode 100755
new mode 100644
index 4344b70ae..3d876a570
--- a/core/lib/Thelia/Model/Map/ContentDocumentTableMap.php
+++ b/core/lib/Thelia/Model/Map/ContentDocumentTableMap.php
@@ -111,7 +111,7 @@ class ContentDocumentTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/ContentFolderTableMap.php b/core/lib/Thelia/Model/Map/ContentFolderTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/ContentI18nTableMap.php b/core/lib/Thelia/Model/Map/ContentI18nTableMap.php
old mode 100755
new mode 100644
index ee9122a6c..f718623b0
--- a/core/lib/Thelia/Model/Map/ContentI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/ContentI18nTableMap.php
@@ -151,7 +151,7 @@ class ContentI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'content', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/ContentImageI18nTableMap.php b/core/lib/Thelia/Model/Map/ContentImageI18nTableMap.php
old mode 100755
new mode 100644
index 6ff343d16..759349d27
--- a/core/lib/Thelia/Model/Map/ContentImageI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/ContentImageI18nTableMap.php
@@ -151,7 +151,7 @@ class ContentImageI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'content_image', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/ContentImageTableMap.php b/core/lib/Thelia/Model/Map/ContentImageTableMap.php
old mode 100755
new mode 100644
index c95761ab2..f731c51a8
--- a/core/lib/Thelia/Model/Map/ContentImageTableMap.php
+++ b/core/lib/Thelia/Model/Map/ContentImageTableMap.php
@@ -111,7 +111,7 @@ class ContentImageTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/ContentTableMap.php b/core/lib/Thelia/Model/Map/ContentTableMap.php
old mode 100755
new mode 100644
index f89e7fd20..ae9b908c0
--- a/core/lib/Thelia/Model/Map/ContentTableMap.php
+++ b/core/lib/Thelia/Model/Map/ContentTableMap.php
@@ -121,7 +121,7 @@ class ContentTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/ContentVersionTableMap.php b/core/lib/Thelia/Model/Map/ContentVersionTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/CountryI18nTableMap.php b/core/lib/Thelia/Model/Map/CountryI18nTableMap.php
old mode 100755
new mode 100644
index cc60b09d2..272231464
--- a/core/lib/Thelia/Model/Map/CountryI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/CountryI18nTableMap.php
@@ -151,7 +151,7 @@ class CountryI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'country', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/CountryTableMap.php b/core/lib/Thelia/Model/Map/CountryTableMap.php
old mode 100755
new mode 100644
index 2e4931e37..e7c356f08
--- a/core/lib/Thelia/Model/Map/CountryTableMap.php
+++ b/core/lib/Thelia/Model/Map/CountryTableMap.php
@@ -116,7 +116,7 @@ class CountryTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/CouponI18nTableMap.php b/core/lib/Thelia/Model/Map/CouponI18nTableMap.php
index 99d49216c..46ecdce3b 100644
--- a/core/lib/Thelia/Model/Map/CouponI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/CouponI18nTableMap.php
@@ -57,7 +57,7 @@ class CouponI18nTableMap extends TableMap
/**
* The total number of columns
*/
- const NUM_COLUMNS = 2;
+ const NUM_COLUMNS = 5;
/**
* The number of lazy-loaded columns
@@ -67,7 +67,7 @@ class CouponI18nTableMap extends TableMap
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
- const NUM_HYDRATE_COLUMNS = 2;
+ const NUM_HYDRATE_COLUMNS = 5;
/**
* the column name for the ID field
@@ -79,6 +79,21 @@ class CouponI18nTableMap extends TableMap
*/
const LOCALE = 'coupon_i18n.LOCALE';
+ /**
+ * the column name for the TITLE field
+ */
+ const TITLE = 'coupon_i18n.TITLE';
+
+ /**
+ * the column name for the SHORT_DESCRIPTION field
+ */
+ const SHORT_DESCRIPTION = 'coupon_i18n.SHORT_DESCRIPTION';
+
+ /**
+ * the column name for the DESCRIPTION field
+ */
+ const DESCRIPTION = 'coupon_i18n.DESCRIPTION';
+
/**
* The default string format for model objects of the related table
*/
@@ -91,12 +106,12 @@ class CouponI18nTableMap extends TableMap
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
- self::TYPE_PHPNAME => array('Id', 'Locale', ),
- self::TYPE_STUDLYPHPNAME => array('id', 'locale', ),
- self::TYPE_COLNAME => array(CouponI18nTableMap::ID, CouponI18nTableMap::LOCALE, ),
- self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', ),
- self::TYPE_FIELDNAME => array('id', 'locale', ),
- self::TYPE_NUM => array(0, 1, )
+ self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', 'ShortDescription', 'Description', ),
+ self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'shortDescription', 'description', ),
+ self::TYPE_COLNAME => array(CouponI18nTableMap::ID, CouponI18nTableMap::LOCALE, CouponI18nTableMap::TITLE, CouponI18nTableMap::SHORT_DESCRIPTION, CouponI18nTableMap::DESCRIPTION, ),
+ self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'SHORT_DESCRIPTION', 'DESCRIPTION', ),
+ self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'short_description', 'description', ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, )
);
/**
@@ -106,12 +121,12 @@ class CouponI18nTableMap extends TableMap
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
- self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, ),
- self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, ),
- self::TYPE_COLNAME => array(CouponI18nTableMap::ID => 0, CouponI18nTableMap::LOCALE => 1, ),
- self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, ),
- self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, ),
- self::TYPE_NUM => array(0, 1, )
+ self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'ShortDescription' => 3, 'Description' => 4, ),
+ self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'shortDescription' => 3, 'description' => 4, ),
+ self::TYPE_COLNAME => array(CouponI18nTableMap::ID => 0, CouponI18nTableMap::LOCALE => 1, CouponI18nTableMap::TITLE => 2, CouponI18nTableMap::SHORT_DESCRIPTION => 3, CouponI18nTableMap::DESCRIPTION => 4, ),
+ self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'SHORT_DESCRIPTION' => 3, 'DESCRIPTION' => 4, ),
+ self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'short_description' => 3, 'description' => 4, ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, )
);
/**
@@ -131,7 +146,10 @@ class CouponI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'coupon', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
+ $this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
+ $this->addColumn('SHORT_DESCRIPTION', 'ShortDescription', 'LONGVARCHAR', true, null, null);
+ $this->addColumn('DESCRIPTION', 'Description', 'CLOB', true, null, null);
} // initialize()
/**
@@ -331,9 +349,15 @@ class CouponI18nTableMap extends TableMap
if (null === $alias) {
$criteria->addSelectColumn(CouponI18nTableMap::ID);
$criteria->addSelectColumn(CouponI18nTableMap::LOCALE);
+ $criteria->addSelectColumn(CouponI18nTableMap::TITLE);
+ $criteria->addSelectColumn(CouponI18nTableMap::SHORT_DESCRIPTION);
+ $criteria->addSelectColumn(CouponI18nTableMap::DESCRIPTION);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.LOCALE');
+ $criteria->addSelectColumn($alias . '.TITLE');
+ $criteria->addSelectColumn($alias . '.SHORT_DESCRIPTION');
+ $criteria->addSelectColumn($alias . '.DESCRIPTION');
}
}
diff --git a/core/lib/Thelia/Model/Map/CouponOrderTableMap.php b/core/lib/Thelia/Model/Map/CouponOrderTableMap.php
old mode 100755
new mode 100644
index 1826bcb70..d96183505
--- a/core/lib/Thelia/Model/Map/CouponOrderTableMap.php
+++ b/core/lib/Thelia/Model/Map/CouponOrderTableMap.php
@@ -57,7 +57,7 @@ class CouponOrderTableMap extends TableMap
/**
* The total number of columns
*/
- const NUM_COLUMNS = 6;
+ const NUM_COLUMNS = 5;
/**
* The number of lazy-loaded columns
@@ -67,7 +67,7 @@ class CouponOrderTableMap extends TableMap
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
- const NUM_HYDRATE_COLUMNS = 6;
+ const NUM_HYDRATE_COLUMNS = 5;
/**
* the column name for the ID field
@@ -79,11 +79,6 @@ class CouponOrderTableMap extends TableMap
*/
const ORDER_ID = 'coupon_order.ORDER_ID';
- /**
- * the column name for the CODE field
- */
- const CODE = 'coupon_order.CODE';
-
/**
* the column name for the VALUE field
*/
@@ -111,12 +106,12 @@ class CouponOrderTableMap extends TableMap
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
- self::TYPE_PHPNAME => array('Id', 'OrderId', 'Code', 'Value', 'CreatedAt', 'UpdatedAt', ),
- self::TYPE_STUDLYPHPNAME => array('id', 'orderId', 'code', 'value', 'createdAt', 'updatedAt', ),
- self::TYPE_COLNAME => array(CouponOrderTableMap::ID, CouponOrderTableMap::ORDER_ID, CouponOrderTableMap::CODE, CouponOrderTableMap::VALUE, CouponOrderTableMap::CREATED_AT, CouponOrderTableMap::UPDATED_AT, ),
- self::TYPE_RAW_COLNAME => array('ID', 'ORDER_ID', 'CODE', 'VALUE', 'CREATED_AT', 'UPDATED_AT', ),
- self::TYPE_FIELDNAME => array('id', 'order_id', 'code', 'value', 'created_at', 'updated_at', ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
+ self::TYPE_PHPNAME => array('Id', 'OrderId', 'Value', 'CreatedAt', 'UpdatedAt', ),
+ self::TYPE_STUDLYPHPNAME => array('id', 'orderId', 'value', 'createdAt', 'updatedAt', ),
+ self::TYPE_COLNAME => array(CouponOrderTableMap::ID, CouponOrderTableMap::ORDER_ID, CouponOrderTableMap::VALUE, CouponOrderTableMap::CREATED_AT, CouponOrderTableMap::UPDATED_AT, ),
+ self::TYPE_RAW_COLNAME => array('ID', 'ORDER_ID', 'VALUE', 'CREATED_AT', 'UPDATED_AT', ),
+ self::TYPE_FIELDNAME => array('id', 'order_id', 'value', 'created_at', 'updated_at', ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, )
);
/**
@@ -126,12 +121,12 @@ class CouponOrderTableMap extends TableMap
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
- self::TYPE_PHPNAME => array('Id' => 0, 'OrderId' => 1, 'Code' => 2, 'Value' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, ),
- self::TYPE_STUDLYPHPNAME => array('id' => 0, 'orderId' => 1, 'code' => 2, 'value' => 3, 'createdAt' => 4, 'updatedAt' => 5, ),
- self::TYPE_COLNAME => array(CouponOrderTableMap::ID => 0, CouponOrderTableMap::ORDER_ID => 1, CouponOrderTableMap::CODE => 2, CouponOrderTableMap::VALUE => 3, CouponOrderTableMap::CREATED_AT => 4, CouponOrderTableMap::UPDATED_AT => 5, ),
- self::TYPE_RAW_COLNAME => array('ID' => 0, 'ORDER_ID' => 1, 'CODE' => 2, 'VALUE' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, ),
- self::TYPE_FIELDNAME => array('id' => 0, 'order_id' => 1, 'code' => 2, 'value' => 3, 'created_at' => 4, 'updated_at' => 5, ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
+ self::TYPE_PHPNAME => array('Id' => 0, 'OrderId' => 1, 'Value' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ),
+ self::TYPE_STUDLYPHPNAME => array('id' => 0, 'orderId' => 1, 'value' => 2, 'createdAt' => 3, 'updatedAt' => 4, ),
+ self::TYPE_COLNAME => array(CouponOrderTableMap::ID => 0, CouponOrderTableMap::ORDER_ID => 1, CouponOrderTableMap::VALUE => 2, CouponOrderTableMap::CREATED_AT => 3, CouponOrderTableMap::UPDATED_AT => 4, ),
+ self::TYPE_RAW_COLNAME => array('ID' => 0, 'ORDER_ID' => 1, 'VALUE' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ),
+ self::TYPE_FIELDNAME => array('id' => 0, 'order_id' => 1, 'value' => 2, 'created_at' => 3, 'updated_at' => 4, ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, )
);
/**
@@ -152,7 +147,6 @@ class CouponOrderTableMap extends TableMap
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('ORDER_ID', 'OrderId', 'INTEGER', 'order', 'ID', true, null, null);
- $this->addForeignKey('CODE', 'Code', 'VARCHAR', 'coupon', 'CODE', true, 45, null);
$this->addColumn('VALUE', 'Value', 'FLOAT', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
@@ -164,7 +158,6 @@ class CouponOrderTableMap extends TableMap
public function buildRelations()
{
$this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::MANY_TO_ONE, array('order_id' => 'id', ), 'CASCADE', 'RESTRICT');
- $this->addRelation('Coupon', '\\Thelia\\Model\\Coupon', RelationMap::MANY_TO_ONE, array('code' => 'code', ), null, null);
} // buildRelations()
/**
@@ -320,14 +313,12 @@ class CouponOrderTableMap extends TableMap
if (null === $alias) {
$criteria->addSelectColumn(CouponOrderTableMap::ID);
$criteria->addSelectColumn(CouponOrderTableMap::ORDER_ID);
- $criteria->addSelectColumn(CouponOrderTableMap::CODE);
$criteria->addSelectColumn(CouponOrderTableMap::VALUE);
$criteria->addSelectColumn(CouponOrderTableMap::CREATED_AT);
$criteria->addSelectColumn(CouponOrderTableMap::UPDATED_AT);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.ORDER_ID');
- $criteria->addSelectColumn($alias . '.CODE');
$criteria->addSelectColumn($alias . '.VALUE');
$criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT');
diff --git a/core/lib/Thelia/Model/Map/CouponRuleTableMap.php b/core/lib/Thelia/Model/Map/CouponRuleTableMap.php
deleted file mode 100755
index 99faeac59..000000000
--- a/core/lib/Thelia/Model/Map/CouponRuleTableMap.php
+++ /dev/null
@@ -1,463 +0,0 @@
- array('Id', 'CouponId', 'Controller', 'Operation', 'Value', 'CreatedAt', 'UpdatedAt', ),
- self::TYPE_STUDLYPHPNAME => array('id', 'couponId', 'controller', 'operation', 'value', 'createdAt', 'updatedAt', ),
- self::TYPE_COLNAME => array(CouponRuleTableMap::ID, CouponRuleTableMap::COUPON_ID, CouponRuleTableMap::CONTROLLER, CouponRuleTableMap::OPERATION, CouponRuleTableMap::VALUE, CouponRuleTableMap::CREATED_AT, CouponRuleTableMap::UPDATED_AT, ),
- self::TYPE_RAW_COLNAME => array('ID', 'COUPON_ID', 'CONTROLLER', 'OPERATION', 'VALUE', 'CREATED_AT', 'UPDATED_AT', ),
- self::TYPE_FIELDNAME => array('id', 'coupon_id', 'controller', 'operation', 'value', 'created_at', 'updated_at', ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, )
- );
-
- /**
- * holds an array of keys for quick access to the fieldnames array
- *
- * first dimension keys are the type constants
- * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
- */
- protected static $fieldKeys = array (
- self::TYPE_PHPNAME => array('Id' => 0, 'CouponId' => 1, 'Controller' => 2, 'Operation' => 3, 'Value' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, ),
- self::TYPE_STUDLYPHPNAME => array('id' => 0, 'couponId' => 1, 'controller' => 2, 'operation' => 3, 'value' => 4, 'createdAt' => 5, 'updatedAt' => 6, ),
- self::TYPE_COLNAME => array(CouponRuleTableMap::ID => 0, CouponRuleTableMap::COUPON_ID => 1, CouponRuleTableMap::CONTROLLER => 2, CouponRuleTableMap::OPERATION => 3, CouponRuleTableMap::VALUE => 4, CouponRuleTableMap::CREATED_AT => 5, CouponRuleTableMap::UPDATED_AT => 6, ),
- self::TYPE_RAW_COLNAME => array('ID' => 0, 'COUPON_ID' => 1, 'CONTROLLER' => 2, 'OPERATION' => 3, 'VALUE' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, ),
- self::TYPE_FIELDNAME => array('id' => 0, 'coupon_id' => 1, 'controller' => 2, 'operation' => 3, 'value' => 4, 'created_at' => 5, 'updated_at' => 6, ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, )
- );
-
- /**
- * Initialize the table attributes and columns
- * Relations are not initialized by this method since they are lazy loaded
- *
- * @return void
- * @throws PropelException
- */
- public function initialize()
- {
- // attributes
- $this->setName('coupon_rule');
- $this->setPhpName('CouponRule');
- $this->setClassName('\\Thelia\\Model\\CouponRule');
- $this->setPackage('Thelia.Model');
- $this->setUseIdGenerator(true);
- // columns
- $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
- $this->addForeignKey('COUPON_ID', 'CouponId', 'INTEGER', 'coupon', 'ID', true, null, null);
- $this->addColumn('CONTROLLER', 'Controller', 'VARCHAR', false, 255, null);
- $this->addColumn('OPERATION', 'Operation', 'VARCHAR', false, 255, null);
- $this->addColumn('VALUE', 'Value', 'FLOAT', false, null, null);
- $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
- $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
- } // initialize()
-
- /**
- * Build the RelationMap objects for this table relationships
- */
- public function buildRelations()
- {
- $this->addRelation('Coupon', '\\Thelia\\Model\\Coupon', RelationMap::MANY_TO_ONE, array('coupon_id' => 'id', ), 'CASCADE', 'RESTRICT');
- } // buildRelations()
-
- /**
- *
- * Gets the list of behaviors registered for this table
- *
- * @return array Associative array (name => parameters) of behaviors
- */
- public function getBehaviors()
- {
- return array(
- 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
- );
- } // getBehaviors()
-
- /**
- * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
- *
- * For tables with a single-column primary key, that simple pkey value will be returned. For tables with
- * a multi-column primary key, a serialize()d version of the primary key will be returned.
- *
- * @param array $row resultset row.
- * @param int $offset The 0-based offset for reading from the resultset row.
- * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
- * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
- */
- public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
- {
- // If the PK cannot be derived from the row, return NULL.
- if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) {
- return null;
- }
-
- return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
- }
-
- /**
- * Retrieves the primary key from the DB resultset row
- * For tables with a single-column primary key, that simple pkey value will be returned. For tables with
- * a multi-column primary key, an array of the primary key columns will be returned.
- *
- * @param array $row resultset row.
- * @param int $offset The 0-based offset for reading from the resultset row.
- * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
- * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
- *
- * @return mixed The primary key of the row
- */
- public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
- {
-
- return (int) $row[
- $indexType == TableMap::TYPE_NUM
- ? 0 + $offset
- : self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)
- ];
- }
-
- /**
- * The class that the tableMap will make instances of.
- *
- * If $withPrefix is true, the returned path
- * uses a dot-path notation which is translated into a path
- * relative to a location on the PHP include_path.
- * (e.g. path.to.MyClass -> 'path/to/MyClass.php')
- *
- * @param boolean $withPrefix Whether or not to return the path with the class name
- * @return string path.to.ClassName
- */
- public static function getOMClass($withPrefix = true)
- {
- return $withPrefix ? CouponRuleTableMap::CLASS_DEFAULT : CouponRuleTableMap::OM_CLASS;
- }
-
- /**
- * Populates an object of the default type or an object that inherit from the default.
- *
- * @param array $row row returned by DataFetcher->fetch().
- * @param int $offset The 0-based offset for reading from the resultset row.
- * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
- One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
- * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
- *
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
- * @return array (CouponRule object, last column rank)
- */
- public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
- {
- $key = CouponRuleTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
- if (null !== ($obj = CouponRuleTableMap::getInstanceFromPool($key))) {
- // We no longer rehydrate the object, since this can cause data loss.
- // See http://www.propelorm.org/ticket/509
- // $obj->hydrate($row, $offset, true); // rehydrate
- $col = $offset + CouponRuleTableMap::NUM_HYDRATE_COLUMNS;
- } else {
- $cls = CouponRuleTableMap::OM_CLASS;
- $obj = new $cls();
- $col = $obj->hydrate($row, $offset, false, $indexType);
- CouponRuleTableMap::addInstanceToPool($obj, $key);
- }
-
- return array($obj, $col);
- }
-
- /**
- * The returned array will contain objects of the default type or
- * objects that inherit from the default.
- *
- * @param DataFetcherInterface $dataFetcher
- * @return array
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
- */
- public static function populateObjects(DataFetcherInterface $dataFetcher)
- {
- $results = array();
-
- // set the class once to avoid overhead in the loop
- $cls = static::getOMClass(false);
- // populate the object(s)
- while ($row = $dataFetcher->fetch()) {
- $key = CouponRuleTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
- if (null !== ($obj = CouponRuleTableMap::getInstanceFromPool($key))) {
- // We no longer rehydrate the object, since this can cause data loss.
- // See http://www.propelorm.org/ticket/509
- // $obj->hydrate($row, 0, true); // rehydrate
- $results[] = $obj;
- } else {
- $obj = new $cls();
- $obj->hydrate($row);
- $results[] = $obj;
- CouponRuleTableMap::addInstanceToPool($obj, $key);
- } // if key exists
- }
-
- return $results;
- }
- /**
- * Add all the columns needed to create a new object.
- *
- * Note: any columns that were marked with lazyLoad="true" in the
- * XML schema will not be added to the select list and only loaded
- * on demand.
- *
- * @param Criteria $criteria object containing the columns to add.
- * @param string $alias optional table alias
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
- */
- public static function addSelectColumns(Criteria $criteria, $alias = null)
- {
- if (null === $alias) {
- $criteria->addSelectColumn(CouponRuleTableMap::ID);
- $criteria->addSelectColumn(CouponRuleTableMap::COUPON_ID);
- $criteria->addSelectColumn(CouponRuleTableMap::CONTROLLER);
- $criteria->addSelectColumn(CouponRuleTableMap::OPERATION);
- $criteria->addSelectColumn(CouponRuleTableMap::VALUE);
- $criteria->addSelectColumn(CouponRuleTableMap::CREATED_AT);
- $criteria->addSelectColumn(CouponRuleTableMap::UPDATED_AT);
- } else {
- $criteria->addSelectColumn($alias . '.ID');
- $criteria->addSelectColumn($alias . '.COUPON_ID');
- $criteria->addSelectColumn($alias . '.CONTROLLER');
- $criteria->addSelectColumn($alias . '.OPERATION');
- $criteria->addSelectColumn($alias . '.VALUE');
- $criteria->addSelectColumn($alias . '.CREATED_AT');
- $criteria->addSelectColumn($alias . '.UPDATED_AT');
- }
- }
-
- /**
- * Returns the TableMap related to this object.
- * This method is not needed for general use but a specific application could have a need.
- * @return TableMap
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
- */
- public static function getTableMap()
- {
- return Propel::getServiceContainer()->getDatabaseMap(CouponRuleTableMap::DATABASE_NAME)->getTable(CouponRuleTableMap::TABLE_NAME);
- }
-
- /**
- * Add a TableMap instance to the database for this tableMap class.
- */
- public static function buildTableMap()
- {
- $dbMap = Propel::getServiceContainer()->getDatabaseMap(CouponRuleTableMap::DATABASE_NAME);
- if (!$dbMap->hasTable(CouponRuleTableMap::TABLE_NAME)) {
- $dbMap->addTableObject(new CouponRuleTableMap());
- }
- }
-
- /**
- * Performs a DELETE on the database, given a CouponRule or Criteria object OR a primary key value.
- *
- * @param mixed $values Criteria or CouponRule object or primary key or array of primary keys
- * which is used to create the DELETE statement
- * @param ConnectionInterface $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
- * if supported by native driver or if emulated using Propel.
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
- */
- public static function doDelete($values, ConnectionInterface $con = null)
- {
- if (null === $con) {
- $con = Propel::getServiceContainer()->getWriteConnection(CouponRuleTableMap::DATABASE_NAME);
- }
-
- if ($values instanceof Criteria) {
- // rename for clarity
- $criteria = $values;
- } elseif ($values instanceof \Thelia\Model\CouponRule) { // it's a model object
- // create criteria based on pk values
- $criteria = $values->buildPkeyCriteria();
- } else { // it's a primary key, or an array of pks
- $criteria = new Criteria(CouponRuleTableMap::DATABASE_NAME);
- $criteria->add(CouponRuleTableMap::ID, (array) $values, Criteria::IN);
- }
-
- $query = CouponRuleQuery::create()->mergeWith($criteria);
-
- if ($values instanceof Criteria) { CouponRuleTableMap::clearInstancePool();
- } elseif (!is_object($values)) { // it's a primary key, or an array of pks
- foreach ((array) $values as $singleval) { CouponRuleTableMap::removeInstanceFromPool($singleval);
- }
- }
-
- return $query->delete($con);
- }
-
- /**
- * Deletes all rows from the coupon_rule table.
- *
- * @param ConnectionInterface $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver).
- */
- public static function doDeleteAll(ConnectionInterface $con = null)
- {
- return CouponRuleQuery::create()->doDeleteAll($con);
- }
-
- /**
- * Performs an INSERT on the database, given a CouponRule or Criteria object.
- *
- * @param mixed $criteria Criteria or CouponRule object containing data that is used to create the INSERT statement.
- * @param ConnectionInterface $con the ConnectionInterface connection to use
- * @return mixed The new primary key.
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
- */
- public static function doInsert($criteria, ConnectionInterface $con = null)
- {
- if (null === $con) {
- $con = Propel::getServiceContainer()->getWriteConnection(CouponRuleTableMap::DATABASE_NAME);
- }
-
- if ($criteria instanceof Criteria) {
- $criteria = clone $criteria; // rename for clarity
- } else {
- $criteria = $criteria->buildCriteria(); // build Criteria from CouponRule object
- }
-
- if ($criteria->containsKey(CouponRuleTableMap::ID) && $criteria->keyContainsValue(CouponRuleTableMap::ID) ) {
- throw new PropelException('Cannot insert a value for auto-increment primary key ('.CouponRuleTableMap::ID.')');
- }
-
-
- // Set the correct dbName
- $query = CouponRuleQuery::create()->mergeWith($criteria);
-
- try {
- // use transaction because $criteria could contain info
- // for more than one table (I guess, conceivably)
- $con->beginTransaction();
- $pk = $query->doInsert($con);
- $con->commit();
- } catch (PropelException $e) {
- $con->rollBack();
- throw $e;
- }
-
- return $pk;
- }
-
-} // CouponRuleTableMap
-// This is the static code needed to register the TableMap for this table with the main Propel class.
-//
-CouponRuleTableMap::buildTableMap();
diff --git a/core/lib/Thelia/Model/Map/CouponTableMap.php b/core/lib/Thelia/Model/Map/CouponTableMap.php
old mode 100755
new mode 100644
index d3ba620bf..bd9079be6
--- a/core/lib/Thelia/Model/Map/CouponTableMap.php
+++ b/core/lib/Thelia/Model/Map/CouponTableMap.php
@@ -57,7 +57,7 @@ class CouponTableMap extends TableMap
/**
* The total number of columns
*/
- const NUM_COLUMNS = 18;
+ const NUM_COLUMNS = 15;
/**
* The number of lazy-loaded columns
@@ -67,7 +67,7 @@ class CouponTableMap extends TableMap
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
- const NUM_HYDRATE_COLUMNS = 18;
+ const NUM_HYDRATE_COLUMNS = 15;
/**
* the column name for the ID field
@@ -84,21 +84,6 @@ class CouponTableMap extends TableMap
*/
const TYPE = 'coupon.TYPE';
- /**
- * the column name for the TITLE field
- */
- const TITLE = 'coupon.TITLE';
-
- /**
- * the column name for the SHORT_DESCRIPTION field
- */
- const SHORT_DESCRIPTION = 'coupon.SHORT_DESCRIPTION';
-
- /**
- * the column name for the DESCRIPTION field
- */
- const DESCRIPTION = 'coupon.DESCRIPTION';
-
/**
* the column name for the AMOUNT field
*/
@@ -171,7 +156,7 @@ class CouponTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
@@ -180,12 +165,12 @@ class CouponTableMap extends TableMap
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
- self::TYPE_PHPNAME => array('Id', 'Code', 'Type', 'Title', 'ShortDescription', 'Description', 'Amount', 'IsUsed', 'IsEnabled', 'ExpirationDate', 'SerializedRules', 'IsCumulative', 'IsRemovingPostage', 'MaxUsage', 'IsAvailableOnSpecialOffers', 'CreatedAt', 'UpdatedAt', 'Version', ),
- self::TYPE_STUDLYPHPNAME => array('id', 'code', 'type', 'title', 'shortDescription', 'description', 'amount', 'isUsed', 'isEnabled', 'expirationDate', 'serializedRules', 'isCumulative', 'isRemovingPostage', 'maxUsage', 'isAvailableOnSpecialOffers', 'createdAt', 'updatedAt', 'version', ),
- self::TYPE_COLNAME => array(CouponTableMap::ID, CouponTableMap::CODE, CouponTableMap::TYPE, CouponTableMap::TITLE, CouponTableMap::SHORT_DESCRIPTION, CouponTableMap::DESCRIPTION, CouponTableMap::AMOUNT, CouponTableMap::IS_USED, CouponTableMap::IS_ENABLED, CouponTableMap::EXPIRATION_DATE, CouponTableMap::SERIALIZED_RULES, CouponTableMap::IS_CUMULATIVE, CouponTableMap::IS_REMOVING_POSTAGE, CouponTableMap::MAX_USAGE, CouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS, CouponTableMap::CREATED_AT, CouponTableMap::UPDATED_AT, CouponTableMap::VERSION, ),
- self::TYPE_RAW_COLNAME => array('ID', 'CODE', 'TYPE', 'TITLE', 'SHORT_DESCRIPTION', 'DESCRIPTION', 'AMOUNT', 'IS_USED', 'IS_ENABLED', 'EXPIRATION_DATE', 'SERIALIZED_RULES', 'IS_CUMULATIVE', 'IS_REMOVING_POSTAGE', 'MAX_USAGE', 'IS_AVAILABLE_ON_SPECIAL_OFFERS', 'CREATED_AT', 'UPDATED_AT', 'VERSION', ),
- self::TYPE_FIELDNAME => array('id', 'code', 'type', 'title', 'short_description', 'description', 'amount', 'is_used', 'is_enabled', 'expiration_date', 'serialized_rules', 'is_cumulative', 'is_removing_postage', 'max_usage', 'is_available_on_special_offers', 'created_at', 'updated_at', 'version', ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
+ self::TYPE_PHPNAME => array('Id', 'Code', 'Type', 'Amount', 'IsUsed', 'IsEnabled', 'ExpirationDate', 'SerializedRules', 'IsCumulative', 'IsRemovingPostage', 'MaxUsage', 'IsAvailableOnSpecialOffers', 'CreatedAt', 'UpdatedAt', 'Version', ),
+ self::TYPE_STUDLYPHPNAME => array('id', 'code', 'type', 'amount', 'isUsed', 'isEnabled', 'expirationDate', 'serializedRules', 'isCumulative', 'isRemovingPostage', 'maxUsage', 'isAvailableOnSpecialOffers', 'createdAt', 'updatedAt', 'version', ),
+ self::TYPE_COLNAME => array(CouponTableMap::ID, CouponTableMap::CODE, CouponTableMap::TYPE, CouponTableMap::AMOUNT, CouponTableMap::IS_USED, CouponTableMap::IS_ENABLED, CouponTableMap::EXPIRATION_DATE, CouponTableMap::SERIALIZED_RULES, CouponTableMap::IS_CUMULATIVE, CouponTableMap::IS_REMOVING_POSTAGE, CouponTableMap::MAX_USAGE, CouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS, CouponTableMap::CREATED_AT, CouponTableMap::UPDATED_AT, CouponTableMap::VERSION, ),
+ self::TYPE_RAW_COLNAME => array('ID', 'CODE', 'TYPE', 'AMOUNT', 'IS_USED', 'IS_ENABLED', 'EXPIRATION_DATE', 'SERIALIZED_RULES', 'IS_CUMULATIVE', 'IS_REMOVING_POSTAGE', 'MAX_USAGE', 'IS_AVAILABLE_ON_SPECIAL_OFFERS', 'CREATED_AT', 'UPDATED_AT', 'VERSION', ),
+ self::TYPE_FIELDNAME => array('id', 'code', 'type', 'amount', 'is_used', 'is_enabled', 'expiration_date', 'serialized_rules', 'is_cumulative', 'is_removing_postage', 'max_usage', 'is_available_on_special_offers', 'created_at', 'updated_at', 'version', ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
);
/**
@@ -195,12 +180,12 @@ class CouponTableMap extends TableMap
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
- self::TYPE_PHPNAME => array('Id' => 0, 'Code' => 1, 'Type' => 2, 'Title' => 3, 'ShortDescription' => 4, 'Description' => 5, 'Amount' => 6, 'IsUsed' => 7, 'IsEnabled' => 8, 'ExpirationDate' => 9, 'SerializedRules' => 10, 'IsCumulative' => 11, 'IsRemovingPostage' => 12, 'MaxUsage' => 13, 'IsAvailableOnSpecialOffers' => 14, 'CreatedAt' => 15, 'UpdatedAt' => 16, 'Version' => 17, ),
- self::TYPE_STUDLYPHPNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'title' => 3, 'shortDescription' => 4, 'description' => 5, 'amount' => 6, 'isUsed' => 7, 'isEnabled' => 8, 'expirationDate' => 9, 'serializedRules' => 10, 'isCumulative' => 11, 'isRemovingPostage' => 12, 'maxUsage' => 13, 'isAvailableOnSpecialOffers' => 14, 'createdAt' => 15, 'updatedAt' => 16, 'version' => 17, ),
- self::TYPE_COLNAME => array(CouponTableMap::ID => 0, CouponTableMap::CODE => 1, CouponTableMap::TYPE => 2, CouponTableMap::TITLE => 3, CouponTableMap::SHORT_DESCRIPTION => 4, CouponTableMap::DESCRIPTION => 5, CouponTableMap::AMOUNT => 6, CouponTableMap::IS_USED => 7, CouponTableMap::IS_ENABLED => 8, CouponTableMap::EXPIRATION_DATE => 9, CouponTableMap::SERIALIZED_RULES => 10, CouponTableMap::IS_CUMULATIVE => 11, CouponTableMap::IS_REMOVING_POSTAGE => 12, CouponTableMap::MAX_USAGE => 13, CouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS => 14, CouponTableMap::CREATED_AT => 15, CouponTableMap::UPDATED_AT => 16, CouponTableMap::VERSION => 17, ),
- self::TYPE_RAW_COLNAME => array('ID' => 0, 'CODE' => 1, 'TYPE' => 2, 'TITLE' => 3, 'SHORT_DESCRIPTION' => 4, 'DESCRIPTION' => 5, 'AMOUNT' => 6, 'IS_USED' => 7, 'IS_ENABLED' => 8, 'EXPIRATION_DATE' => 9, 'SERIALIZED_RULES' => 10, 'IS_CUMULATIVE' => 11, 'IS_REMOVING_POSTAGE' => 12, 'MAX_USAGE' => 13, 'IS_AVAILABLE_ON_SPECIAL_OFFERS' => 14, 'CREATED_AT' => 15, 'UPDATED_AT' => 16, 'VERSION' => 17, ),
- self::TYPE_FIELDNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'title' => 3, 'short_description' => 4, 'description' => 5, 'amount' => 6, 'is_used' => 7, 'is_enabled' => 8, 'expiration_date' => 9, 'serialized_rules' => 10, 'is_cumulative' => 11, 'is_removing_postage' => 12, 'max_usage' => 13, 'is_available_on_special_offers' => 14, 'created_at' => 15, 'updated_at' => 16, 'version' => 17, ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
+ self::TYPE_PHPNAME => array('Id' => 0, 'Code' => 1, 'Type' => 2, 'Amount' => 3, 'IsUsed' => 4, 'IsEnabled' => 5, 'ExpirationDate' => 6, 'SerializedRules' => 7, 'IsCumulative' => 8, 'IsRemovingPostage' => 9, 'MaxUsage' => 10, 'IsAvailableOnSpecialOffers' => 11, 'CreatedAt' => 12, 'UpdatedAt' => 13, 'Version' => 14, ),
+ self::TYPE_STUDLYPHPNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'amount' => 3, 'isUsed' => 4, 'isEnabled' => 5, 'expirationDate' => 6, 'serializedRules' => 7, 'isCumulative' => 8, 'isRemovingPostage' => 9, 'maxUsage' => 10, 'isAvailableOnSpecialOffers' => 11, 'createdAt' => 12, 'updatedAt' => 13, 'version' => 14, ),
+ self::TYPE_COLNAME => array(CouponTableMap::ID => 0, CouponTableMap::CODE => 1, CouponTableMap::TYPE => 2, CouponTableMap::AMOUNT => 3, CouponTableMap::IS_USED => 4, CouponTableMap::IS_ENABLED => 5, CouponTableMap::EXPIRATION_DATE => 6, CouponTableMap::SERIALIZED_RULES => 7, CouponTableMap::IS_CUMULATIVE => 8, CouponTableMap::IS_REMOVING_POSTAGE => 9, CouponTableMap::MAX_USAGE => 10, CouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS => 11, CouponTableMap::CREATED_AT => 12, CouponTableMap::UPDATED_AT => 13, CouponTableMap::VERSION => 14, ),
+ self::TYPE_RAW_COLNAME => array('ID' => 0, 'CODE' => 1, 'TYPE' => 2, 'AMOUNT' => 3, 'IS_USED' => 4, 'IS_ENABLED' => 5, 'EXPIRATION_DATE' => 6, 'SERIALIZED_RULES' => 7, 'IS_CUMULATIVE' => 8, 'IS_REMOVING_POSTAGE' => 9, 'MAX_USAGE' => 10, 'IS_AVAILABLE_ON_SPECIAL_OFFERS' => 11, 'CREATED_AT' => 12, 'UPDATED_AT' => 13, 'VERSION' => 14, ),
+ self::TYPE_FIELDNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'amount' => 3, 'is_used' => 4, 'is_enabled' => 5, 'expiration_date' => 6, 'serialized_rules' => 7, 'is_cumulative' => 8, 'is_removing_postage' => 9, 'max_usage' => 10, 'is_available_on_special_offers' => 11, 'created_at' => 12, 'updated_at' => 13, 'version' => 14, ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
);
/**
@@ -222,9 +207,6 @@ class CouponTableMap extends TableMap
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', true, 45, null);
$this->addColumn('TYPE', 'Type', 'VARCHAR', true, 255, null);
- $this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
- $this->addColumn('SHORT_DESCRIPTION', 'ShortDescription', 'LONGVARCHAR', true, null, null);
- $this->addColumn('DESCRIPTION', 'Description', 'CLOB', true, null, null);
$this->addColumn('AMOUNT', 'Amount', 'FLOAT', true, null, null);
$this->addColumn('IS_USED', 'IsUsed', 'TINYINT', true, null, null);
$this->addColumn('IS_ENABLED', 'IsEnabled', 'TINYINT', true, null, null);
@@ -244,7 +226,6 @@ class CouponTableMap extends TableMap
*/
public function buildRelations()
{
- $this->addRelation('CouponOrder', '\\Thelia\\Model\\CouponOrder', RelationMap::ONE_TO_MANY, array('code' => 'code', ), null, null, 'CouponOrders');
$this->addRelation('CouponI18n', '\\Thelia\\Model\\CouponI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'CouponI18ns');
$this->addRelation('CouponVersion', '\\Thelia\\Model\\CouponVersion', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'CouponVersions');
} // buildRelations()
@@ -259,7 +240,7 @@ class CouponTableMap extends TableMap
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
- 'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => '', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
+ 'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, short_description, description', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
'versionable' => array('version_column' => 'version', 'version_table' => '', 'log_created_at' => 'false', 'log_created_by' => 'false', 'log_comment' => 'false', 'version_created_at_column' => 'version_created_at', 'version_created_by_column' => 'version_created_by', 'version_comment_column' => 'version_comment', ),
);
} // getBehaviors()
@@ -415,9 +396,6 @@ class CouponTableMap extends TableMap
$criteria->addSelectColumn(CouponTableMap::ID);
$criteria->addSelectColumn(CouponTableMap::CODE);
$criteria->addSelectColumn(CouponTableMap::TYPE);
- $criteria->addSelectColumn(CouponTableMap::TITLE);
- $criteria->addSelectColumn(CouponTableMap::SHORT_DESCRIPTION);
- $criteria->addSelectColumn(CouponTableMap::DESCRIPTION);
$criteria->addSelectColumn(CouponTableMap::AMOUNT);
$criteria->addSelectColumn(CouponTableMap::IS_USED);
$criteria->addSelectColumn(CouponTableMap::IS_ENABLED);
@@ -434,9 +412,6 @@ class CouponTableMap extends TableMap
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.CODE');
$criteria->addSelectColumn($alias . '.TYPE');
- $criteria->addSelectColumn($alias . '.TITLE');
- $criteria->addSelectColumn($alias . '.SHORT_DESCRIPTION');
- $criteria->addSelectColumn($alias . '.DESCRIPTION');
$criteria->addSelectColumn($alias . '.AMOUNT');
$criteria->addSelectColumn($alias . '.IS_USED');
$criteria->addSelectColumn($alias . '.IS_ENABLED');
diff --git a/core/lib/Thelia/Model/Map/CouponVersionTableMap.php b/core/lib/Thelia/Model/Map/CouponVersionTableMap.php
index 9db387a86..30ce279b8 100644
--- a/core/lib/Thelia/Model/Map/CouponVersionTableMap.php
+++ b/core/lib/Thelia/Model/Map/CouponVersionTableMap.php
@@ -57,7 +57,7 @@ class CouponVersionTableMap extends TableMap
/**
* The total number of columns
*/
- const NUM_COLUMNS = 18;
+ const NUM_COLUMNS = 15;
/**
* The number of lazy-loaded columns
@@ -67,7 +67,7 @@ class CouponVersionTableMap extends TableMap
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
- const NUM_HYDRATE_COLUMNS = 18;
+ const NUM_HYDRATE_COLUMNS = 15;
/**
* the column name for the ID field
@@ -84,21 +84,6 @@ class CouponVersionTableMap extends TableMap
*/
const TYPE = 'coupon_version.TYPE';
- /**
- * the column name for the TITLE field
- */
- const TITLE = 'coupon_version.TITLE';
-
- /**
- * the column name for the SHORT_DESCRIPTION field
- */
- const SHORT_DESCRIPTION = 'coupon_version.SHORT_DESCRIPTION';
-
- /**
- * the column name for the DESCRIPTION field
- */
- const DESCRIPTION = 'coupon_version.DESCRIPTION';
-
/**
* the column name for the AMOUNT field
*/
@@ -171,12 +156,12 @@ class CouponVersionTableMap extends TableMap
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
- self::TYPE_PHPNAME => array('Id', 'Code', 'Type', 'Title', 'ShortDescription', 'Description', 'Amount', 'IsUsed', 'IsEnabled', 'ExpirationDate', 'SerializedRules', 'IsCumulative', 'IsRemovingPostage', 'MaxUsage', 'IsAvailableOnSpecialOffers', 'CreatedAt', 'UpdatedAt', 'Version', ),
- self::TYPE_STUDLYPHPNAME => array('id', 'code', 'type', 'title', 'shortDescription', 'description', 'amount', 'isUsed', 'isEnabled', 'expirationDate', 'serializedRules', 'isCumulative', 'isRemovingPostage', 'maxUsage', 'isAvailableOnSpecialOffers', 'createdAt', 'updatedAt', 'version', ),
- self::TYPE_COLNAME => array(CouponVersionTableMap::ID, CouponVersionTableMap::CODE, CouponVersionTableMap::TYPE, CouponVersionTableMap::TITLE, CouponVersionTableMap::SHORT_DESCRIPTION, CouponVersionTableMap::DESCRIPTION, CouponVersionTableMap::AMOUNT, CouponVersionTableMap::IS_USED, CouponVersionTableMap::IS_ENABLED, CouponVersionTableMap::EXPIRATION_DATE, CouponVersionTableMap::SERIALIZED_RULES, CouponVersionTableMap::IS_CUMULATIVE, CouponVersionTableMap::IS_REMOVING_POSTAGE, CouponVersionTableMap::MAX_USAGE, CouponVersionTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS, CouponVersionTableMap::CREATED_AT, CouponVersionTableMap::UPDATED_AT, CouponVersionTableMap::VERSION, ),
- self::TYPE_RAW_COLNAME => array('ID', 'CODE', 'TYPE', 'TITLE', 'SHORT_DESCRIPTION', 'DESCRIPTION', 'AMOUNT', 'IS_USED', 'IS_ENABLED', 'EXPIRATION_DATE', 'SERIALIZED_RULES', 'IS_CUMULATIVE', 'IS_REMOVING_POSTAGE', 'MAX_USAGE', 'IS_AVAILABLE_ON_SPECIAL_OFFERS', 'CREATED_AT', 'UPDATED_AT', 'VERSION', ),
- self::TYPE_FIELDNAME => array('id', 'code', 'type', 'title', 'short_description', 'description', 'amount', 'is_used', 'is_enabled', 'expiration_date', 'serialized_rules', 'is_cumulative', 'is_removing_postage', 'max_usage', 'is_available_on_special_offers', 'created_at', 'updated_at', 'version', ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
+ self::TYPE_PHPNAME => array('Id', 'Code', 'Type', 'Amount', 'IsUsed', 'IsEnabled', 'ExpirationDate', 'SerializedRules', 'IsCumulative', 'IsRemovingPostage', 'MaxUsage', 'IsAvailableOnSpecialOffers', 'CreatedAt', 'UpdatedAt', 'Version', ),
+ self::TYPE_STUDLYPHPNAME => array('id', 'code', 'type', 'amount', 'isUsed', 'isEnabled', 'expirationDate', 'serializedRules', 'isCumulative', 'isRemovingPostage', 'maxUsage', 'isAvailableOnSpecialOffers', 'createdAt', 'updatedAt', 'version', ),
+ self::TYPE_COLNAME => array(CouponVersionTableMap::ID, CouponVersionTableMap::CODE, CouponVersionTableMap::TYPE, CouponVersionTableMap::AMOUNT, CouponVersionTableMap::IS_USED, CouponVersionTableMap::IS_ENABLED, CouponVersionTableMap::EXPIRATION_DATE, CouponVersionTableMap::SERIALIZED_RULES, CouponVersionTableMap::IS_CUMULATIVE, CouponVersionTableMap::IS_REMOVING_POSTAGE, CouponVersionTableMap::MAX_USAGE, CouponVersionTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS, CouponVersionTableMap::CREATED_AT, CouponVersionTableMap::UPDATED_AT, CouponVersionTableMap::VERSION, ),
+ self::TYPE_RAW_COLNAME => array('ID', 'CODE', 'TYPE', 'AMOUNT', 'IS_USED', 'IS_ENABLED', 'EXPIRATION_DATE', 'SERIALIZED_RULES', 'IS_CUMULATIVE', 'IS_REMOVING_POSTAGE', 'MAX_USAGE', 'IS_AVAILABLE_ON_SPECIAL_OFFERS', 'CREATED_AT', 'UPDATED_AT', 'VERSION', ),
+ self::TYPE_FIELDNAME => array('id', 'code', 'type', 'amount', 'is_used', 'is_enabled', 'expiration_date', 'serialized_rules', 'is_cumulative', 'is_removing_postage', 'max_usage', 'is_available_on_special_offers', 'created_at', 'updated_at', 'version', ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
);
/**
@@ -186,12 +171,12 @@ class CouponVersionTableMap extends TableMap
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
- self::TYPE_PHPNAME => array('Id' => 0, 'Code' => 1, 'Type' => 2, 'Title' => 3, 'ShortDescription' => 4, 'Description' => 5, 'Amount' => 6, 'IsUsed' => 7, 'IsEnabled' => 8, 'ExpirationDate' => 9, 'SerializedRules' => 10, 'IsCumulative' => 11, 'IsRemovingPostage' => 12, 'MaxUsage' => 13, 'IsAvailableOnSpecialOffers' => 14, 'CreatedAt' => 15, 'UpdatedAt' => 16, 'Version' => 17, ),
- self::TYPE_STUDLYPHPNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'title' => 3, 'shortDescription' => 4, 'description' => 5, 'amount' => 6, 'isUsed' => 7, 'isEnabled' => 8, 'expirationDate' => 9, 'serializedRules' => 10, 'isCumulative' => 11, 'isRemovingPostage' => 12, 'maxUsage' => 13, 'isAvailableOnSpecialOffers' => 14, 'createdAt' => 15, 'updatedAt' => 16, 'version' => 17, ),
- self::TYPE_COLNAME => array(CouponVersionTableMap::ID => 0, CouponVersionTableMap::CODE => 1, CouponVersionTableMap::TYPE => 2, CouponVersionTableMap::TITLE => 3, CouponVersionTableMap::SHORT_DESCRIPTION => 4, CouponVersionTableMap::DESCRIPTION => 5, CouponVersionTableMap::AMOUNT => 6, CouponVersionTableMap::IS_USED => 7, CouponVersionTableMap::IS_ENABLED => 8, CouponVersionTableMap::EXPIRATION_DATE => 9, CouponVersionTableMap::SERIALIZED_RULES => 10, CouponVersionTableMap::IS_CUMULATIVE => 11, CouponVersionTableMap::IS_REMOVING_POSTAGE => 12, CouponVersionTableMap::MAX_USAGE => 13, CouponVersionTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS => 14, CouponVersionTableMap::CREATED_AT => 15, CouponVersionTableMap::UPDATED_AT => 16, CouponVersionTableMap::VERSION => 17, ),
- self::TYPE_RAW_COLNAME => array('ID' => 0, 'CODE' => 1, 'TYPE' => 2, 'TITLE' => 3, 'SHORT_DESCRIPTION' => 4, 'DESCRIPTION' => 5, 'AMOUNT' => 6, 'IS_USED' => 7, 'IS_ENABLED' => 8, 'EXPIRATION_DATE' => 9, 'SERIALIZED_RULES' => 10, 'IS_CUMULATIVE' => 11, 'IS_REMOVING_POSTAGE' => 12, 'MAX_USAGE' => 13, 'IS_AVAILABLE_ON_SPECIAL_OFFERS' => 14, 'CREATED_AT' => 15, 'UPDATED_AT' => 16, 'VERSION' => 17, ),
- self::TYPE_FIELDNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'title' => 3, 'short_description' => 4, 'description' => 5, 'amount' => 6, 'is_used' => 7, 'is_enabled' => 8, 'expiration_date' => 9, 'serialized_rules' => 10, 'is_cumulative' => 11, 'is_removing_postage' => 12, 'max_usage' => 13, 'is_available_on_special_offers' => 14, 'created_at' => 15, 'updated_at' => 16, 'version' => 17, ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
+ self::TYPE_PHPNAME => array('Id' => 0, 'Code' => 1, 'Type' => 2, 'Amount' => 3, 'IsUsed' => 4, 'IsEnabled' => 5, 'ExpirationDate' => 6, 'SerializedRules' => 7, 'IsCumulative' => 8, 'IsRemovingPostage' => 9, 'MaxUsage' => 10, 'IsAvailableOnSpecialOffers' => 11, 'CreatedAt' => 12, 'UpdatedAt' => 13, 'Version' => 14, ),
+ self::TYPE_STUDLYPHPNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'amount' => 3, 'isUsed' => 4, 'isEnabled' => 5, 'expirationDate' => 6, 'serializedRules' => 7, 'isCumulative' => 8, 'isRemovingPostage' => 9, 'maxUsage' => 10, 'isAvailableOnSpecialOffers' => 11, 'createdAt' => 12, 'updatedAt' => 13, 'version' => 14, ),
+ self::TYPE_COLNAME => array(CouponVersionTableMap::ID => 0, CouponVersionTableMap::CODE => 1, CouponVersionTableMap::TYPE => 2, CouponVersionTableMap::AMOUNT => 3, CouponVersionTableMap::IS_USED => 4, CouponVersionTableMap::IS_ENABLED => 5, CouponVersionTableMap::EXPIRATION_DATE => 6, CouponVersionTableMap::SERIALIZED_RULES => 7, CouponVersionTableMap::IS_CUMULATIVE => 8, CouponVersionTableMap::IS_REMOVING_POSTAGE => 9, CouponVersionTableMap::MAX_USAGE => 10, CouponVersionTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS => 11, CouponVersionTableMap::CREATED_AT => 12, CouponVersionTableMap::UPDATED_AT => 13, CouponVersionTableMap::VERSION => 14, ),
+ self::TYPE_RAW_COLNAME => array('ID' => 0, 'CODE' => 1, 'TYPE' => 2, 'AMOUNT' => 3, 'IS_USED' => 4, 'IS_ENABLED' => 5, 'EXPIRATION_DATE' => 6, 'SERIALIZED_RULES' => 7, 'IS_CUMULATIVE' => 8, 'IS_REMOVING_POSTAGE' => 9, 'MAX_USAGE' => 10, 'IS_AVAILABLE_ON_SPECIAL_OFFERS' => 11, 'CREATED_AT' => 12, 'UPDATED_AT' => 13, 'VERSION' => 14, ),
+ self::TYPE_FIELDNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'amount' => 3, 'is_used' => 4, 'is_enabled' => 5, 'expiration_date' => 6, 'serialized_rules' => 7, 'is_cumulative' => 8, 'is_removing_postage' => 9, 'max_usage' => 10, 'is_available_on_special_offers' => 11, 'created_at' => 12, 'updated_at' => 13, 'version' => 14, ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
);
/**
@@ -213,9 +198,6 @@ class CouponVersionTableMap extends TableMap
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'coupon', 'ID', true, null, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', true, 45, null);
$this->addColumn('TYPE', 'Type', 'VARCHAR', true, 255, null);
- $this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
- $this->addColumn('SHORT_DESCRIPTION', 'ShortDescription', 'LONGVARCHAR', true, null, null);
- $this->addColumn('DESCRIPTION', 'Description', 'CLOB', true, null, null);
$this->addColumn('AMOUNT', 'Amount', 'FLOAT', true, null, null);
$this->addColumn('IS_USED', 'IsUsed', 'TINYINT', true, null, null);
$this->addColumn('IS_ENABLED', 'IsEnabled', 'TINYINT', true, null, null);
@@ -305,11 +287,11 @@ class CouponVersionTableMap extends TableMap
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
{
// If the PK cannot be derived from the row, return NULL.
- if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 17 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)] === null) {
+ if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 14 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)] === null) {
return null;
}
- return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 17 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]));
+ return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 14 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]));
}
/**
@@ -428,9 +410,6 @@ class CouponVersionTableMap extends TableMap
$criteria->addSelectColumn(CouponVersionTableMap::ID);
$criteria->addSelectColumn(CouponVersionTableMap::CODE);
$criteria->addSelectColumn(CouponVersionTableMap::TYPE);
- $criteria->addSelectColumn(CouponVersionTableMap::TITLE);
- $criteria->addSelectColumn(CouponVersionTableMap::SHORT_DESCRIPTION);
- $criteria->addSelectColumn(CouponVersionTableMap::DESCRIPTION);
$criteria->addSelectColumn(CouponVersionTableMap::AMOUNT);
$criteria->addSelectColumn(CouponVersionTableMap::IS_USED);
$criteria->addSelectColumn(CouponVersionTableMap::IS_ENABLED);
@@ -447,9 +426,6 @@ class CouponVersionTableMap extends TableMap
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.CODE');
$criteria->addSelectColumn($alias . '.TYPE');
- $criteria->addSelectColumn($alias . '.TITLE');
- $criteria->addSelectColumn($alias . '.SHORT_DESCRIPTION');
- $criteria->addSelectColumn($alias . '.DESCRIPTION');
$criteria->addSelectColumn($alias . '.AMOUNT');
$criteria->addSelectColumn($alias . '.IS_USED');
$criteria->addSelectColumn($alias . '.IS_ENABLED');
diff --git a/core/lib/Thelia/Model/Map/CurrencyI18nTableMap.php b/core/lib/Thelia/Model/Map/CurrencyI18nTableMap.php
old mode 100755
new mode 100644
index d280f8601..c7e4725c1
--- a/core/lib/Thelia/Model/Map/CurrencyI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/CurrencyI18nTableMap.php
@@ -136,7 +136,7 @@ class CurrencyI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'currency', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('NAME', 'Name', 'VARCHAR', false, 45, null);
} // initialize()
diff --git a/core/lib/Thelia/Model/Map/CurrencyTableMap.php b/core/lib/Thelia/Model/Map/CurrencyTableMap.php
old mode 100755
new mode 100644
index 08ecf6966..b37a6b30a
--- a/core/lib/Thelia/Model/Map/CurrencyTableMap.php
+++ b/core/lib/Thelia/Model/Map/CurrencyTableMap.php
@@ -121,7 +121,7 @@ class CurrencyTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/CustomerTableMap.php b/core/lib/Thelia/Model/Map/CustomerTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/CustomerTitleI18nTableMap.php b/core/lib/Thelia/Model/Map/CustomerTitleI18nTableMap.php
old mode 100755
new mode 100644
index d403756fa..5344099c5
--- a/core/lib/Thelia/Model/Map/CustomerTitleI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/CustomerTitleI18nTableMap.php
@@ -141,7 +141,7 @@ class CustomerTitleI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'customer_title', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('SHORT', 'Short', 'VARCHAR', false, 10, null);
$this->addColumn('LONG', 'Long', 'VARCHAR', false, 45, null);
} // initialize()
diff --git a/core/lib/Thelia/Model/Map/CustomerTitleTableMap.php b/core/lib/Thelia/Model/Map/CustomerTitleTableMap.php
old mode 100755
new mode 100644
index 2769f365e..c10ce2500
--- a/core/lib/Thelia/Model/Map/CustomerTitleTableMap.php
+++ b/core/lib/Thelia/Model/Map/CustomerTitleTableMap.php
@@ -106,7 +106,7 @@ class CustomerTitleTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/DelivzoneTableMap.php b/core/lib/Thelia/Model/Map/DelivzoneTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/FeatureAvI18nTableMap.php b/core/lib/Thelia/Model/Map/FeatureAvI18nTableMap.php
old mode 100755
new mode 100644
index b3114e7ba..ba592b4b0
--- a/core/lib/Thelia/Model/Map/FeatureAvI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/FeatureAvI18nTableMap.php
@@ -151,7 +151,7 @@ class FeatureAvI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'feature_av', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/FeatureAvTableMap.php b/core/lib/Thelia/Model/Map/FeatureAvTableMap.php
old mode 100755
new mode 100644
index 0559f7ce6..4dd944bb7
--- a/core/lib/Thelia/Model/Map/FeatureAvTableMap.php
+++ b/core/lib/Thelia/Model/Map/FeatureAvTableMap.php
@@ -106,7 +106,7 @@ class FeatureAvTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/FeatureCategoryTableMap.php b/core/lib/Thelia/Model/Map/FeatureCategoryTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/FeatureI18nTableMap.php b/core/lib/Thelia/Model/Map/FeatureI18nTableMap.php
old mode 100755
new mode 100644
index af0dfc263..dba05fb67
--- a/core/lib/Thelia/Model/Map/FeatureI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/FeatureI18nTableMap.php
@@ -151,7 +151,7 @@ class FeatureI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'feature', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/FeatureProductTableMap.php b/core/lib/Thelia/Model/Map/FeatureProductTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/FeatureTableMap.php b/core/lib/Thelia/Model/Map/FeatureTableMap.php
old mode 100755
new mode 100644
index 7d0af0d45..76c2fe724
--- a/core/lib/Thelia/Model/Map/FeatureTableMap.php
+++ b/core/lib/Thelia/Model/Map/FeatureTableMap.php
@@ -106,7 +106,7 @@ class FeatureTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/FolderDocumentI18nTableMap.php b/core/lib/Thelia/Model/Map/FolderDocumentI18nTableMap.php
old mode 100755
new mode 100644
index 5875031fb..28dab9d8f
--- a/core/lib/Thelia/Model/Map/FolderDocumentI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/FolderDocumentI18nTableMap.php
@@ -151,7 +151,7 @@ class FolderDocumentI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'folder_document', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/FolderDocumentTableMap.php b/core/lib/Thelia/Model/Map/FolderDocumentTableMap.php
old mode 100755
new mode 100644
index 467b7a65b..1d0e3b74a
--- a/core/lib/Thelia/Model/Map/FolderDocumentTableMap.php
+++ b/core/lib/Thelia/Model/Map/FolderDocumentTableMap.php
@@ -111,7 +111,7 @@ class FolderDocumentTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/FolderI18nTableMap.php b/core/lib/Thelia/Model/Map/FolderI18nTableMap.php
old mode 100755
new mode 100644
index fc85b17ec..d10344811
--- a/core/lib/Thelia/Model/Map/FolderI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/FolderI18nTableMap.php
@@ -151,7 +151,7 @@ class FolderI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'folder', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/FolderImageI18nTableMap.php b/core/lib/Thelia/Model/Map/FolderImageI18nTableMap.php
old mode 100755
new mode 100644
index 1c89165a4..f0f87fd85
--- a/core/lib/Thelia/Model/Map/FolderImageI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/FolderImageI18nTableMap.php
@@ -151,7 +151,7 @@ class FolderImageI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'folder_image', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/FolderImageTableMap.php b/core/lib/Thelia/Model/Map/FolderImageTableMap.php
old mode 100755
new mode 100644
index c559f9437..6dc186658
--- a/core/lib/Thelia/Model/Map/FolderImageTableMap.php
+++ b/core/lib/Thelia/Model/Map/FolderImageTableMap.php
@@ -111,7 +111,7 @@ class FolderImageTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/FolderTableMap.php b/core/lib/Thelia/Model/Map/FolderTableMap.php
old mode 100755
new mode 100644
index 7f4dde6d0..b35f63ae3
--- a/core/lib/Thelia/Model/Map/FolderTableMap.php
+++ b/core/lib/Thelia/Model/Map/FolderTableMap.php
@@ -126,7 +126,7 @@ class FolderTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/FolderVersionTableMap.php b/core/lib/Thelia/Model/Map/FolderVersionTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/GroupI18nTableMap.php b/core/lib/Thelia/Model/Map/GroupI18nTableMap.php
old mode 100755
new mode 100644
index 585127821..57788593a
--- a/core/lib/Thelia/Model/Map/GroupI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/GroupI18nTableMap.php
@@ -151,7 +151,7 @@ class GroupI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'group', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/GroupModuleTableMap.php b/core/lib/Thelia/Model/Map/GroupModuleTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/GroupResourceTableMap.php b/core/lib/Thelia/Model/Map/GroupResourceTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/GroupTableMap.php b/core/lib/Thelia/Model/Map/GroupTableMap.php
old mode 100755
new mode 100644
index a8c830005..881a2fa84
--- a/core/lib/Thelia/Model/Map/GroupTableMap.php
+++ b/core/lib/Thelia/Model/Map/GroupTableMap.php
@@ -101,7 +101,7 @@ class GroupTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/LangTableMap.php b/core/lib/Thelia/Model/Map/LangTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/MessageI18nTableMap.php b/core/lib/Thelia/Model/Map/MessageI18nTableMap.php
old mode 100755
new mode 100644
index f084515c0..ea5d69766
--- a/core/lib/Thelia/Model/Map/MessageI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/MessageI18nTableMap.php
@@ -57,7 +57,7 @@ class MessageI18nTableMap extends TableMap
/**
* The total number of columns
*/
- const NUM_COLUMNS = 5;
+ const NUM_COLUMNS = 6;
/**
* The number of lazy-loaded columns
@@ -67,7 +67,7 @@ class MessageI18nTableMap extends TableMap
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
- const NUM_HYDRATE_COLUMNS = 5;
+ const NUM_HYDRATE_COLUMNS = 6;
/**
* the column name for the ID field
@@ -85,14 +85,19 @@ class MessageI18nTableMap extends TableMap
const TITLE = 'message_i18n.TITLE';
/**
- * the column name for the DESCRIPTION field
+ * the column name for the SUBJECT field
*/
- const DESCRIPTION = 'message_i18n.DESCRIPTION';
+ const SUBJECT = 'message_i18n.SUBJECT';
/**
- * the column name for the DESCRIPTION_HTML field
+ * the column name for the TEXT_MESSAGE field
*/
- const DESCRIPTION_HTML = 'message_i18n.DESCRIPTION_HTML';
+ const TEXT_MESSAGE = 'message_i18n.TEXT_MESSAGE';
+
+ /**
+ * the column name for the HTML_MESSAGE field
+ */
+ const HTML_MESSAGE = 'message_i18n.HTML_MESSAGE';
/**
* The default string format for model objects of the related table
@@ -106,12 +111,12 @@ class MessageI18nTableMap extends TableMap
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
- self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', 'Description', 'DescriptionHtml', ),
- self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', 'descriptionHtml', ),
- self::TYPE_COLNAME => array(MessageI18nTableMap::ID, MessageI18nTableMap::LOCALE, MessageI18nTableMap::TITLE, MessageI18nTableMap::DESCRIPTION, MessageI18nTableMap::DESCRIPTION_HTML, ),
- self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', 'DESCRIPTION_HTML', ),
- self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', 'description_html', ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, )
+ self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', 'Subject', 'TextMessage', 'HtmlMessage', ),
+ self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'subject', 'textMessage', 'htmlMessage', ),
+ self::TYPE_COLNAME => array(MessageI18nTableMap::ID, MessageI18nTableMap::LOCALE, MessageI18nTableMap::TITLE, MessageI18nTableMap::SUBJECT, MessageI18nTableMap::TEXT_MESSAGE, MessageI18nTableMap::HTML_MESSAGE, ),
+ self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'SUBJECT', 'TEXT_MESSAGE', 'HTML_MESSAGE', ),
+ self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'subject', 'text_message', 'html_message', ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
);
/**
@@ -121,12 +126,12 @@ class MessageI18nTableMap extends TableMap
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
- self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Description' => 3, 'DescriptionHtml' => 4, ),
- self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'descriptionHtml' => 4, ),
- self::TYPE_COLNAME => array(MessageI18nTableMap::ID => 0, MessageI18nTableMap::LOCALE => 1, MessageI18nTableMap::TITLE => 2, MessageI18nTableMap::DESCRIPTION => 3, MessageI18nTableMap::DESCRIPTION_HTML => 4, ),
- self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'DESCRIPTION' => 3, 'DESCRIPTION_HTML' => 4, ),
- self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'description_html' => 4, ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, )
+ self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Subject' => 3, 'TextMessage' => 4, 'HtmlMessage' => 5, ),
+ self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'subject' => 3, 'textMessage' => 4, 'htmlMessage' => 5, ),
+ self::TYPE_COLNAME => array(MessageI18nTableMap::ID => 0, MessageI18nTableMap::LOCALE => 1, MessageI18nTableMap::TITLE => 2, MessageI18nTableMap::SUBJECT => 3, MessageI18nTableMap::TEXT_MESSAGE => 4, MessageI18nTableMap::HTML_MESSAGE => 5, ),
+ self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'SUBJECT' => 3, 'TEXT_MESSAGE' => 4, 'HTML_MESSAGE' => 5, ),
+ self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'subject' => 3, 'text_message' => 4, 'html_message' => 5, ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
);
/**
@@ -146,10 +151,11 @@ class MessageI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'message', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'LONGVARCHAR', false, null, null);
- $this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
- $this->addColumn('DESCRIPTION_HTML', 'DescriptionHtml', 'CLOB', false, null, null);
+ $this->addColumn('SUBJECT', 'Subject', 'LONGVARCHAR', false, null, null);
+ $this->addColumn('TEXT_MESSAGE', 'TextMessage', 'CLOB', false, null, null);
+ $this->addColumn('HTML_MESSAGE', 'HtmlMessage', 'CLOB', false, null, null);
} // initialize()
/**
@@ -350,14 +356,16 @@ class MessageI18nTableMap extends TableMap
$criteria->addSelectColumn(MessageI18nTableMap::ID);
$criteria->addSelectColumn(MessageI18nTableMap::LOCALE);
$criteria->addSelectColumn(MessageI18nTableMap::TITLE);
- $criteria->addSelectColumn(MessageI18nTableMap::DESCRIPTION);
- $criteria->addSelectColumn(MessageI18nTableMap::DESCRIPTION_HTML);
+ $criteria->addSelectColumn(MessageI18nTableMap::SUBJECT);
+ $criteria->addSelectColumn(MessageI18nTableMap::TEXT_MESSAGE);
+ $criteria->addSelectColumn(MessageI18nTableMap::HTML_MESSAGE);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.LOCALE');
$criteria->addSelectColumn($alias . '.TITLE');
- $criteria->addSelectColumn($alias . '.DESCRIPTION');
- $criteria->addSelectColumn($alias . '.DESCRIPTION_HTML');
+ $criteria->addSelectColumn($alias . '.SUBJECT');
+ $criteria->addSelectColumn($alias . '.TEXT_MESSAGE');
+ $criteria->addSelectColumn($alias . '.HTML_MESSAGE');
}
}
diff --git a/core/lib/Thelia/Model/Map/MessageTableMap.php b/core/lib/Thelia/Model/Map/MessageTableMap.php
old mode 100755
new mode 100644
index de2a205f9..d56b1210c
--- a/core/lib/Thelia/Model/Map/MessageTableMap.php
+++ b/core/lib/Thelia/Model/Map/MessageTableMap.php
@@ -57,7 +57,7 @@ class MessageTableMap extends TableMap
/**
* The total number of columns
*/
- const NUM_COLUMNS = 9;
+ const NUM_COLUMNS = 8;
/**
* The number of lazy-loaded columns
@@ -67,7 +67,7 @@ class MessageTableMap extends TableMap
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
- const NUM_HYDRATE_COLUMNS = 9;
+ const NUM_HYDRATE_COLUMNS = 8;
/**
* the column name for the ID field
@@ -75,20 +75,15 @@ class MessageTableMap extends TableMap
const ID = 'message.ID';
/**
- * the column name for the CODE field
+ * the column name for the NAME field
*/
- const CODE = 'message.CODE';
+ const NAME = 'message.NAME';
/**
* the column name for the SECURED field
*/
const SECURED = 'message.SECURED';
- /**
- * the column name for the REF field
- */
- const REF = 'message.REF';
-
/**
* the column name for the CREATED_AT field
*/
@@ -126,7 +121,7 @@ class MessageTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
@@ -135,12 +130,12 @@ class MessageTableMap extends TableMap
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
- self::TYPE_PHPNAME => array('Id', 'Code', 'Secured', 'Ref', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
- self::TYPE_STUDLYPHPNAME => array('id', 'code', 'secured', 'ref', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
- self::TYPE_COLNAME => array(MessageTableMap::ID, MessageTableMap::CODE, MessageTableMap::SECURED, MessageTableMap::REF, MessageTableMap::CREATED_AT, MessageTableMap::UPDATED_AT, MessageTableMap::VERSION, MessageTableMap::VERSION_CREATED_AT, MessageTableMap::VERSION_CREATED_BY, ),
- self::TYPE_RAW_COLNAME => array('ID', 'CODE', 'SECURED', 'REF', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ),
- self::TYPE_FIELDNAME => array('id', 'code', 'secured', 'ref', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ self::TYPE_PHPNAME => array('Id', 'Name', 'Secured', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
+ self::TYPE_STUDLYPHPNAME => array('id', 'name', 'secured', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
+ self::TYPE_COLNAME => array(MessageTableMap::ID, MessageTableMap::NAME, MessageTableMap::SECURED, MessageTableMap::CREATED_AT, MessageTableMap::UPDATED_AT, MessageTableMap::VERSION, MessageTableMap::VERSION_CREATED_AT, MessageTableMap::VERSION_CREATED_BY, ),
+ self::TYPE_RAW_COLNAME => array('ID', 'NAME', 'SECURED', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ),
+ self::TYPE_FIELDNAME => array('id', 'name', 'secured', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
);
/**
@@ -150,12 +145,12 @@ class MessageTableMap extends TableMap
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
- self::TYPE_PHPNAME => array('Id' => 0, 'Code' => 1, 'Secured' => 2, 'Ref' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, 'Version' => 6, 'VersionCreatedAt' => 7, 'VersionCreatedBy' => 8, ),
- self::TYPE_STUDLYPHPNAME => array('id' => 0, 'code' => 1, 'secured' => 2, 'ref' => 3, 'createdAt' => 4, 'updatedAt' => 5, 'version' => 6, 'versionCreatedAt' => 7, 'versionCreatedBy' => 8, ),
- self::TYPE_COLNAME => array(MessageTableMap::ID => 0, MessageTableMap::CODE => 1, MessageTableMap::SECURED => 2, MessageTableMap::REF => 3, MessageTableMap::CREATED_AT => 4, MessageTableMap::UPDATED_AT => 5, MessageTableMap::VERSION => 6, MessageTableMap::VERSION_CREATED_AT => 7, MessageTableMap::VERSION_CREATED_BY => 8, ),
- self::TYPE_RAW_COLNAME => array('ID' => 0, 'CODE' => 1, 'SECURED' => 2, 'REF' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, 'VERSION' => 6, 'VERSION_CREATED_AT' => 7, 'VERSION_CREATED_BY' => 8, ),
- self::TYPE_FIELDNAME => array('id' => 0, 'code' => 1, 'secured' => 2, 'ref' => 3, 'created_at' => 4, 'updated_at' => 5, 'version' => 6, 'version_created_at' => 7, 'version_created_by' => 8, ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ self::TYPE_PHPNAME => array('Id' => 0, 'Name' => 1, 'Secured' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, 'Version' => 5, 'VersionCreatedAt' => 6, 'VersionCreatedBy' => 7, ),
+ self::TYPE_STUDLYPHPNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'createdAt' => 3, 'updatedAt' => 4, 'version' => 5, 'versionCreatedAt' => 6, 'versionCreatedBy' => 7, ),
+ self::TYPE_COLNAME => array(MessageTableMap::ID => 0, MessageTableMap::NAME => 1, MessageTableMap::SECURED => 2, MessageTableMap::CREATED_AT => 3, MessageTableMap::UPDATED_AT => 4, MessageTableMap::VERSION => 5, MessageTableMap::VERSION_CREATED_AT => 6, MessageTableMap::VERSION_CREATED_BY => 7, ),
+ self::TYPE_RAW_COLNAME => array('ID' => 0, 'NAME' => 1, 'SECURED' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, 'VERSION' => 5, 'VERSION_CREATED_AT' => 6, 'VERSION_CREATED_BY' => 7, ),
+ self::TYPE_FIELDNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'created_at' => 3, 'updated_at' => 4, 'version' => 5, 'version_created_at' => 6, 'version_created_by' => 7, ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
);
/**
@@ -175,9 +170,8 @@ class MessageTableMap extends TableMap
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
- $this->addColumn('CODE', 'Code', 'VARCHAR', true, 45, null);
+ $this->addColumn('NAME', 'Name', 'VARCHAR', true, 255, null);
$this->addColumn('SECURED', 'Secured', 'TINYINT', false, null, null);
- $this->addColumn('REF', 'Ref', 'VARCHAR', false, 255, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION', 'Version', 'INTEGER', false, null, 0);
@@ -204,7 +198,7 @@ class MessageTableMap extends TableMap
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
- 'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, description_html', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
+ 'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, subject, text_message, html_message', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
'versionable' => array('version_column' => 'version', 'version_table' => '', 'log_created_at' => 'true', 'log_created_by' => 'true', 'log_comment' => 'false', 'version_created_at_column' => 'version_created_at', 'version_created_by_column' => 'version_created_by', 'version_comment_column' => 'version_comment', ),
);
} // getBehaviors()
@@ -358,9 +352,8 @@ class MessageTableMap extends TableMap
{
if (null === $alias) {
$criteria->addSelectColumn(MessageTableMap::ID);
- $criteria->addSelectColumn(MessageTableMap::CODE);
+ $criteria->addSelectColumn(MessageTableMap::NAME);
$criteria->addSelectColumn(MessageTableMap::SECURED);
- $criteria->addSelectColumn(MessageTableMap::REF);
$criteria->addSelectColumn(MessageTableMap::CREATED_AT);
$criteria->addSelectColumn(MessageTableMap::UPDATED_AT);
$criteria->addSelectColumn(MessageTableMap::VERSION);
@@ -368,9 +361,8 @@ class MessageTableMap extends TableMap
$criteria->addSelectColumn(MessageTableMap::VERSION_CREATED_BY);
} else {
$criteria->addSelectColumn($alias . '.ID');
- $criteria->addSelectColumn($alias . '.CODE');
+ $criteria->addSelectColumn($alias . '.NAME');
$criteria->addSelectColumn($alias . '.SECURED');
- $criteria->addSelectColumn($alias . '.REF');
$criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT');
$criteria->addSelectColumn($alias . '.VERSION');
diff --git a/core/lib/Thelia/Model/Map/MessageVersionTableMap.php b/core/lib/Thelia/Model/Map/MessageVersionTableMap.php
old mode 100755
new mode 100644
index f6587e60a..db043cdc5
--- a/core/lib/Thelia/Model/Map/MessageVersionTableMap.php
+++ b/core/lib/Thelia/Model/Map/MessageVersionTableMap.php
@@ -57,7 +57,7 @@ class MessageVersionTableMap extends TableMap
/**
* The total number of columns
*/
- const NUM_COLUMNS = 9;
+ const NUM_COLUMNS = 8;
/**
* The number of lazy-loaded columns
@@ -67,7 +67,7 @@ class MessageVersionTableMap extends TableMap
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
- const NUM_HYDRATE_COLUMNS = 9;
+ const NUM_HYDRATE_COLUMNS = 8;
/**
* the column name for the ID field
@@ -75,20 +75,15 @@ class MessageVersionTableMap extends TableMap
const ID = 'message_version.ID';
/**
- * the column name for the CODE field
+ * the column name for the NAME field
*/
- const CODE = 'message_version.CODE';
+ const NAME = 'message_version.NAME';
/**
* the column name for the SECURED field
*/
const SECURED = 'message_version.SECURED';
- /**
- * the column name for the REF field
- */
- const REF = 'message_version.REF';
-
/**
* the column name for the CREATED_AT field
*/
@@ -126,12 +121,12 @@ class MessageVersionTableMap extends TableMap
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
- self::TYPE_PHPNAME => array('Id', 'Code', 'Secured', 'Ref', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
- self::TYPE_STUDLYPHPNAME => array('id', 'code', 'secured', 'ref', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
- self::TYPE_COLNAME => array(MessageVersionTableMap::ID, MessageVersionTableMap::CODE, MessageVersionTableMap::SECURED, MessageVersionTableMap::REF, MessageVersionTableMap::CREATED_AT, MessageVersionTableMap::UPDATED_AT, MessageVersionTableMap::VERSION, MessageVersionTableMap::VERSION_CREATED_AT, MessageVersionTableMap::VERSION_CREATED_BY, ),
- self::TYPE_RAW_COLNAME => array('ID', 'CODE', 'SECURED', 'REF', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ),
- self::TYPE_FIELDNAME => array('id', 'code', 'secured', 'ref', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ self::TYPE_PHPNAME => array('Id', 'Name', 'Secured', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
+ self::TYPE_STUDLYPHPNAME => array('id', 'name', 'secured', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
+ self::TYPE_COLNAME => array(MessageVersionTableMap::ID, MessageVersionTableMap::NAME, MessageVersionTableMap::SECURED, MessageVersionTableMap::CREATED_AT, MessageVersionTableMap::UPDATED_AT, MessageVersionTableMap::VERSION, MessageVersionTableMap::VERSION_CREATED_AT, MessageVersionTableMap::VERSION_CREATED_BY, ),
+ self::TYPE_RAW_COLNAME => array('ID', 'NAME', 'SECURED', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ),
+ self::TYPE_FIELDNAME => array('id', 'name', 'secured', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
);
/**
@@ -141,12 +136,12 @@ class MessageVersionTableMap extends TableMap
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
- self::TYPE_PHPNAME => array('Id' => 0, 'Code' => 1, 'Secured' => 2, 'Ref' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, 'Version' => 6, 'VersionCreatedAt' => 7, 'VersionCreatedBy' => 8, ),
- self::TYPE_STUDLYPHPNAME => array('id' => 0, 'code' => 1, 'secured' => 2, 'ref' => 3, 'createdAt' => 4, 'updatedAt' => 5, 'version' => 6, 'versionCreatedAt' => 7, 'versionCreatedBy' => 8, ),
- self::TYPE_COLNAME => array(MessageVersionTableMap::ID => 0, MessageVersionTableMap::CODE => 1, MessageVersionTableMap::SECURED => 2, MessageVersionTableMap::REF => 3, MessageVersionTableMap::CREATED_AT => 4, MessageVersionTableMap::UPDATED_AT => 5, MessageVersionTableMap::VERSION => 6, MessageVersionTableMap::VERSION_CREATED_AT => 7, MessageVersionTableMap::VERSION_CREATED_BY => 8, ),
- self::TYPE_RAW_COLNAME => array('ID' => 0, 'CODE' => 1, 'SECURED' => 2, 'REF' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, 'VERSION' => 6, 'VERSION_CREATED_AT' => 7, 'VERSION_CREATED_BY' => 8, ),
- self::TYPE_FIELDNAME => array('id' => 0, 'code' => 1, 'secured' => 2, 'ref' => 3, 'created_at' => 4, 'updated_at' => 5, 'version' => 6, 'version_created_at' => 7, 'version_created_by' => 8, ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ self::TYPE_PHPNAME => array('Id' => 0, 'Name' => 1, 'Secured' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, 'Version' => 5, 'VersionCreatedAt' => 6, 'VersionCreatedBy' => 7, ),
+ self::TYPE_STUDLYPHPNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'createdAt' => 3, 'updatedAt' => 4, 'version' => 5, 'versionCreatedAt' => 6, 'versionCreatedBy' => 7, ),
+ self::TYPE_COLNAME => array(MessageVersionTableMap::ID => 0, MessageVersionTableMap::NAME => 1, MessageVersionTableMap::SECURED => 2, MessageVersionTableMap::CREATED_AT => 3, MessageVersionTableMap::UPDATED_AT => 4, MessageVersionTableMap::VERSION => 5, MessageVersionTableMap::VERSION_CREATED_AT => 6, MessageVersionTableMap::VERSION_CREATED_BY => 7, ),
+ self::TYPE_RAW_COLNAME => array('ID' => 0, 'NAME' => 1, 'SECURED' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, 'VERSION' => 5, 'VERSION_CREATED_AT' => 6, 'VERSION_CREATED_BY' => 7, ),
+ self::TYPE_FIELDNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'created_at' => 3, 'updated_at' => 4, 'version' => 5, 'version_created_at' => 6, 'version_created_by' => 7, ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
);
/**
@@ -166,9 +161,8 @@ class MessageVersionTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'message', 'ID', true, null, null);
- $this->addColumn('CODE', 'Code', 'VARCHAR', true, 45, null);
+ $this->addColumn('NAME', 'Name', 'VARCHAR', true, 255, null);
$this->addColumn('SECURED', 'Secured', 'TINYINT', false, null, null);
- $this->addColumn('REF', 'Ref', 'VARCHAR', false, 255, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('VERSION', 'Version', 'INTEGER', true, null, 0);
@@ -251,11 +245,11 @@ class MessageVersionTableMap extends TableMap
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
{
// If the PK cannot be derived from the row, return NULL.
- if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 6 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)] === null) {
+ if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 5 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)] === null) {
return null;
}
- return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 6 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]));
+ return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 5 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]));
}
/**
@@ -372,9 +366,8 @@ class MessageVersionTableMap extends TableMap
{
if (null === $alias) {
$criteria->addSelectColumn(MessageVersionTableMap::ID);
- $criteria->addSelectColumn(MessageVersionTableMap::CODE);
+ $criteria->addSelectColumn(MessageVersionTableMap::NAME);
$criteria->addSelectColumn(MessageVersionTableMap::SECURED);
- $criteria->addSelectColumn(MessageVersionTableMap::REF);
$criteria->addSelectColumn(MessageVersionTableMap::CREATED_AT);
$criteria->addSelectColumn(MessageVersionTableMap::UPDATED_AT);
$criteria->addSelectColumn(MessageVersionTableMap::VERSION);
@@ -382,9 +375,8 @@ class MessageVersionTableMap extends TableMap
$criteria->addSelectColumn(MessageVersionTableMap::VERSION_CREATED_BY);
} else {
$criteria->addSelectColumn($alias . '.ID');
- $criteria->addSelectColumn($alias . '.CODE');
+ $criteria->addSelectColumn($alias . '.NAME');
$criteria->addSelectColumn($alias . '.SECURED');
- $criteria->addSelectColumn($alias . '.REF');
$criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT');
$criteria->addSelectColumn($alias . '.VERSION');
diff --git a/core/lib/Thelia/Model/Map/ModuleI18nTableMap.php b/core/lib/Thelia/Model/Map/ModuleI18nTableMap.php
old mode 100755
new mode 100644
index 67b7a34ef..a8e680f1c
--- a/core/lib/Thelia/Model/Map/ModuleI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/ModuleI18nTableMap.php
@@ -151,7 +151,7 @@ class ModuleI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'module', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/ModuleTableMap.php b/core/lib/Thelia/Model/Map/ModuleTableMap.php
old mode 100755
new mode 100644
index 5370c1da1..cccaa890a
--- a/core/lib/Thelia/Model/Map/ModuleTableMap.php
+++ b/core/lib/Thelia/Model/Map/ModuleTableMap.php
@@ -116,7 +116,7 @@ class ModuleTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/OrderAddressTableMap.php b/core/lib/Thelia/Model/Map/OrderAddressTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/OrderFeatureTableMap.php b/core/lib/Thelia/Model/Map/OrderFeatureTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/OrderProductTableMap.php b/core/lib/Thelia/Model/Map/OrderProductTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/OrderStatusI18nTableMap.php b/core/lib/Thelia/Model/Map/OrderStatusI18nTableMap.php
old mode 100755
new mode 100644
index 5d78c474c..1b2052c2e
--- a/core/lib/Thelia/Model/Map/OrderStatusI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/OrderStatusI18nTableMap.php
@@ -151,7 +151,7 @@ class OrderStatusI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'order_status', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/OrderStatusTableMap.php b/core/lib/Thelia/Model/Map/OrderStatusTableMap.php
old mode 100755
new mode 100644
index eecfe5a03..18406d9aa
--- a/core/lib/Thelia/Model/Map/OrderStatusTableMap.php
+++ b/core/lib/Thelia/Model/Map/OrderStatusTableMap.php
@@ -101,7 +101,7 @@ class OrderStatusTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/OrderTableMap.php b/core/lib/Thelia/Model/Map/OrderTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/ProductCategoryTableMap.php b/core/lib/Thelia/Model/Map/ProductCategoryTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/ProductDocumentI18nTableMap.php b/core/lib/Thelia/Model/Map/ProductDocumentI18nTableMap.php
old mode 100755
new mode 100644
index 103914ee6..09e1dc0e4
--- a/core/lib/Thelia/Model/Map/ProductDocumentI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/ProductDocumentI18nTableMap.php
@@ -151,7 +151,7 @@ class ProductDocumentI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'product_document', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/ProductDocumentTableMap.php b/core/lib/Thelia/Model/Map/ProductDocumentTableMap.php
old mode 100755
new mode 100644
index f1420cc43..ff50bad77
--- a/core/lib/Thelia/Model/Map/ProductDocumentTableMap.php
+++ b/core/lib/Thelia/Model/Map/ProductDocumentTableMap.php
@@ -111,7 +111,7 @@ class ProductDocumentTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/ProductI18nTableMap.php b/core/lib/Thelia/Model/Map/ProductI18nTableMap.php
old mode 100755
new mode 100644
index 8da33f15d..79a01514a
--- a/core/lib/Thelia/Model/Map/ProductI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/ProductI18nTableMap.php
@@ -151,7 +151,7 @@ class ProductI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'product', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/ProductImageI18nTableMap.php b/core/lib/Thelia/Model/Map/ProductImageI18nTableMap.php
old mode 100755
new mode 100644
index de3455c07..39ad567f9
--- a/core/lib/Thelia/Model/Map/ProductImageI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/ProductImageI18nTableMap.php
@@ -151,7 +151,7 @@ class ProductImageI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'product_image', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/ProductImageTableMap.php b/core/lib/Thelia/Model/Map/ProductImageTableMap.php
old mode 100755
new mode 100644
index 945799020..36aabed3e
--- a/core/lib/Thelia/Model/Map/ProductImageTableMap.php
+++ b/core/lib/Thelia/Model/Map/ProductImageTableMap.php
@@ -111,7 +111,7 @@ class ProductImageTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/ProductPriceTableMap.php b/core/lib/Thelia/Model/Map/ProductPriceTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php b/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/ProductTableMap.php b/core/lib/Thelia/Model/Map/ProductTableMap.php
old mode 100755
new mode 100644
index 1d46d483e..f69f6f702
--- a/core/lib/Thelia/Model/Map/ProductTableMap.php
+++ b/core/lib/Thelia/Model/Map/ProductTableMap.php
@@ -131,7 +131,7 @@ class ProductTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/ProductVersionTableMap.php b/core/lib/Thelia/Model/Map/ProductVersionTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/ResourceI18nTableMap.php b/core/lib/Thelia/Model/Map/ResourceI18nTableMap.php
old mode 100755
new mode 100644
index 8a8ce501a..ec22e2fd3
--- a/core/lib/Thelia/Model/Map/ResourceI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/ResourceI18nTableMap.php
@@ -151,7 +151,7 @@ class ResourceI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'resource', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/ResourceTableMap.php b/core/lib/Thelia/Model/Map/ResourceTableMap.php
old mode 100755
new mode 100644
index e56960892..8d7708ddd
--- a/core/lib/Thelia/Model/Map/ResourceTableMap.php
+++ b/core/lib/Thelia/Model/Map/ResourceTableMap.php
@@ -101,7 +101,7 @@ class ResourceTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/RewritingUrlTableMap.php b/core/lib/Thelia/Model/Map/RewritingUrlTableMap.php
index 1d6129ed8..c6d5e5473 100644
--- a/core/lib/Thelia/Model/Map/RewritingUrlTableMap.php
+++ b/core/lib/Thelia/Model/Map/RewritingUrlTableMap.php
@@ -162,9 +162,9 @@ class RewritingUrlTableMap extends TableMap
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('URL', 'Url', 'VARCHAR', true, 255, null);
- $this->addColumn('VIEW', 'View', 'VARCHAR', true, 255, null);
+ $this->addColumn('VIEW', 'View', 'VARCHAR', false, 255, null);
$this->addColumn('VIEW_ID', 'ViewId', 'VARCHAR', false, 255, null);
- $this->addColumn('VIEW_LOCALE', 'ViewLocale', 'VARCHAR', true, 255, null);
+ $this->addColumn('VIEW_LOCALE', 'ViewLocale', 'VARCHAR', false, 255, null);
$this->addForeignKey('REDIRECTED', 'Redirected', 'INTEGER', 'rewriting_url', 'ID', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
diff --git a/core/lib/Thelia/Model/Map/TaxI18nTableMap.php b/core/lib/Thelia/Model/Map/TaxI18nTableMap.php
old mode 100755
new mode 100644
index 2c4c92f4f..a06230c37
--- a/core/lib/Thelia/Model/Map/TaxI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/TaxI18nTableMap.php
@@ -141,7 +141,7 @@ class TaxI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'tax', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
} // initialize()
diff --git a/core/lib/Thelia/Model/Map/TaxRuleCountryTableMap.php b/core/lib/Thelia/Model/Map/TaxRuleCountryTableMap.php
old mode 100755
new mode 100644
diff --git a/core/lib/Thelia/Model/Map/TaxRuleI18nTableMap.php b/core/lib/Thelia/Model/Map/TaxRuleI18nTableMap.php
old mode 100755
new mode 100644
index 689f30728..1f0ed1e96
--- a/core/lib/Thelia/Model/Map/TaxRuleI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/TaxRuleI18nTableMap.php
@@ -131,7 +131,7 @@ class TaxRuleI18nTableMap extends TableMap
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'tax_rule', 'ID', true, null, null);
- $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
+ $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
} // initialize()
/**
diff --git a/core/lib/Thelia/Model/Map/TaxRuleTableMap.php b/core/lib/Thelia/Model/Map/TaxRuleTableMap.php
old mode 100755
new mode 100644
index 9b862de99..cc5f628b9
--- a/core/lib/Thelia/Model/Map/TaxRuleTableMap.php
+++ b/core/lib/Thelia/Model/Map/TaxRuleTableMap.php
@@ -111,7 +111,7 @@ class TaxRuleTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Map/TaxTableMap.php b/core/lib/Thelia/Model/Map/TaxTableMap.php
old mode 100755
new mode 100644
index b941e7b52..6d43f20e9
--- a/core/lib/Thelia/Model/Map/TaxTableMap.php
+++ b/core/lib/Thelia/Model/Map/TaxTableMap.php
@@ -101,7 +101,7 @@ class TaxTableMap extends TableMap
*
* @var string
*/
- const DEFAULT_LOCALE = 'en_EN';
+ const DEFAULT_LOCALE = 'en_US';
/**
* holds an array of fieldnames
diff --git a/core/lib/Thelia/Model/Message.php b/core/lib/Thelia/Model/Message.php
index 777c9eaaf..97fb45469 100755
--- a/core/lib/Thelia/Model/Message.php
+++ b/core/lib/Thelia/Model/Message.php
@@ -3,7 +3,65 @@
namespace Thelia\Model;
use Thelia\Model\Base\Message as BaseMessage;
+use Propel\Runtime\Connection\ConnectionInterface;
+use Thelia\Core\Event\TheliaEvents;
+use Thelia\Core\Event\MessageEvent;
class Message extends BaseMessage {
+ use \Thelia\Model\Tools\ModelEventDispatcherTrait;
+
+ /**
+ * {@inheritDoc}
+ */
+ public function preInsert(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::BEFORE_CREATEMESSAGE, new MessageEvent($this));
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function postInsert(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::AFTER_CREATEMESSAGE, new MessageEvent($this));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function preUpdate(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::BEFORE_CHANGEMESSAGE, new MessageEvent($this));
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function postUpdate(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::AFTER_CHANGEMESSAGE, new MessageEvent($this));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function preDelete(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::BEFORE_DELETEMESSAGE, new MessageEvent($this));
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function postDelete(ConnectionInterface $con = null)
+ {
+ $this->dispatchEvent(TheliaEvents::AFTER_DELETEMESSAGE, new MessageEvent($this));
+ }
}
diff --git a/core/lib/Thelia/Model/Rewriting.php b/core/lib/Thelia/Model/Rewriting.php
new file mode 100644
index 000000000..8d6f75fab
--- /dev/null
+++ b/core/lib/Thelia/Model/Rewriting.php
@@ -0,0 +1,9 @@
+format = $format;
+ $serializer = $this->getSerializer();
+
+ if (isset($data)) {
+ $this->setContent($serializer->serialize($data, $this->format));
+ }
+
+ $this->headers->set('Content-Type', 'application/' . $this->format);
+ }
+
+ /**
+ * Set Content to be serialized in the response, array or object
+ *
+ * @param array $data array or object to be serialized
+ *
+ * @return $this
+ */
+ public function setRestContent($data)
+ {
+ $serializer = $this->getSerializer();
+
+ if (isset($data)) {
+ $this->setContent($serializer->serialize($data, $this->format));
+ }
+
+ return $this;
+ }
+
+ /**
+ * Get Serializer
+ *
+ * @return Serializer
+ */
+ protected function getSerializer()
+ {
+ $encoders = array(new XmlEncoder(), new JsonEncoder());
+ $normalizers = array(new GetSetMethodNormalizer());
+
+ return new Serializer($normalizers, $encoders);
+ }
+
+}
diff --git a/install/faker.php b/install/faker.php
index 8ba653bec..9dcab3995 100755
--- a/install/faker.php
+++ b/install/faker.php
@@ -406,7 +406,7 @@ function createCategory($faker, $parent, $position, &$categoryIdList, $contentId
//add random associated content
$alreadyPicked = array();
- for($i=1; $i| Code | -XMAS13 | +#CODE | |
| Title | -Coupon for XMAS -30 € | +#TITLE | |
| Expiration date | -25/12/2013 | +EXPIRATION_DATE | |
| Usage left | -49 times | ++ {if #USAGE_LEFT} + + #USAGE_LEFT + + {else} + + 0 + + {/if} + | +|
| #SHORT_DESCRIPTION | +|||
| #DESCRIPTION | +|||
| + {if #IS_CUMULATIVE} + + {intl l="May be cumulative"} + + {else} + + {intl l="Can't be cumulative"} + + {/if} + | |||
| May be combined | -Yes | ++ {if #IS_REMOVING_POSTAGE} + + {intl l="Will remove postage"} + + {else} + + {intl l="Won't remove postage"} + + {/if} + | |
| Cancel shipping | -No | -||
| Effect | -Remove 30 € to the cart price | +Amount | +#AMOUNT |
| Conditions of application | @@ -73,10 +109,12 @@|||