MAJ en Thelia 2.3.4
This commit is contained in:
@@ -159,6 +159,19 @@ abstract class Customer implements ActiveRecordInterface
|
||||
*/
|
||||
protected $remember_me_serial;
|
||||
|
||||
/**
|
||||
* The value for the enable field.
|
||||
* Note: this column has a database default value of: 0
|
||||
* @var int
|
||||
*/
|
||||
protected $enable;
|
||||
|
||||
/**
|
||||
* The value for the confirmation_token field.
|
||||
* @var string
|
||||
*/
|
||||
protected $confirmation_token;
|
||||
|
||||
/**
|
||||
* The value for the created_at field.
|
||||
* @var string
|
||||
@@ -296,6 +309,7 @@ abstract class Customer implements ActiveRecordInterface
|
||||
public function applyDefaultValues()
|
||||
{
|
||||
$this->discount = '0.000000';
|
||||
$this->enable = 0;
|
||||
$this->version = 0;
|
||||
}
|
||||
|
||||
@@ -713,6 +727,28 @@ abstract class Customer implements ActiveRecordInterface
|
||||
return $this->remember_me_serial;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [enable] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getEnable()
|
||||
{
|
||||
|
||||
return $this->enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [confirmation_token] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getConfirmationToken()
|
||||
{
|
||||
|
||||
return $this->confirmation_token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [created_at] column value.
|
||||
*
|
||||
@@ -1097,6 +1133,48 @@ abstract class Customer implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setRememberMeSerial()
|
||||
|
||||
/**
|
||||
* Set the value of [enable] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\Customer The current object (for fluent API support)
|
||||
*/
|
||||
public function setEnable($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->enable !== $v) {
|
||||
$this->enable = $v;
|
||||
$this->modifiedColumns[CustomerTableMap::ENABLE] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setEnable()
|
||||
|
||||
/**
|
||||
* Set the value of [confirmation_token] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Customer The current object (for fluent API support)
|
||||
*/
|
||||
public function setConfirmationToken($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->confirmation_token !== $v) {
|
||||
$this->confirmation_token = $v;
|
||||
$this->modifiedColumns[CustomerTableMap::CONFIRMATION_TOKEN] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setConfirmationToken()
|
||||
|
||||
/**
|
||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||
*
|
||||
@@ -1216,6 +1294,10 @@ abstract class Customer implements ActiveRecordInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->enable !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->version !== 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -1289,28 +1371,34 @@ abstract class Customer implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CustomerTableMap::translateFieldName('RememberMeSerial', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->remember_me_serial = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CustomerTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CustomerTableMap::translateFieldName('Enable', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->enable = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : CustomerTableMap::translateFieldName('ConfirmationToken', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->confirmation_token = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 16 + $startcol : CustomerTableMap::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 ? 15 + $startcol : CustomerTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : CustomerTableMap::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 ? 16 + $startcol : CustomerTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 18 + $startcol : CustomerTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : CustomerTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 19 + $startcol : CustomerTableMap::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 ? 18 + $startcol : CustomerTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 20 + $startcol : CustomerTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version_created_by = (null !== $col) ? (string) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
@@ -1320,7 +1408,7 @@ abstract class Customer implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 19; // 19 = CustomerTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 21; // 21 = CustomerTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\Customer object", 0, $e);
|
||||
@@ -1744,6 +1832,12 @@ abstract class Customer implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CustomerTableMap::REMEMBER_ME_SERIAL)) {
|
||||
$modifiedColumns[':p' . $index++] = '`REMEMBER_ME_SERIAL`';
|
||||
}
|
||||
if ($this->isColumnModified(CustomerTableMap::ENABLE)) {
|
||||
$modifiedColumns[':p' . $index++] = '`ENABLE`';
|
||||
}
|
||||
if ($this->isColumnModified(CustomerTableMap::CONFIRMATION_TOKEN)) {
|
||||
$modifiedColumns[':p' . $index++] = '`CONFIRMATION_TOKEN`';
|
||||
}
|
||||
if ($this->isColumnModified(CustomerTableMap::CREATED_AT)) {
|
||||
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
|
||||
}
|
||||
@@ -1812,6 +1906,12 @@ abstract class Customer implements ActiveRecordInterface
|
||||
case '`REMEMBER_ME_SERIAL`':
|
||||
$stmt->bindValue($identifier, $this->remember_me_serial, PDO::PARAM_STR);
|
||||
break;
|
||||
case '`ENABLE`':
|
||||
$stmt->bindValue($identifier, $this->enable, PDO::PARAM_INT);
|
||||
break;
|
||||
case '`CONFIRMATION_TOKEN`':
|
||||
$stmt->bindValue($identifier, $this->confirmation_token, 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;
|
||||
@@ -1932,18 +2032,24 @@ abstract class Customer implements ActiveRecordInterface
|
||||
return $this->getRememberMeSerial();
|
||||
break;
|
||||
case 14:
|
||||
return $this->getCreatedAt();
|
||||
return $this->getEnable();
|
||||
break;
|
||||
case 15:
|
||||
return $this->getUpdatedAt();
|
||||
return $this->getConfirmationToken();
|
||||
break;
|
||||
case 16:
|
||||
return $this->getVersion();
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 17:
|
||||
return $this->getVersionCreatedAt();
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
case 18:
|
||||
return $this->getVersion();
|
||||
break;
|
||||
case 19:
|
||||
return $this->getVersionCreatedAt();
|
||||
break;
|
||||
case 20:
|
||||
return $this->getVersionCreatedBy();
|
||||
break;
|
||||
default:
|
||||
@@ -1989,11 +2095,13 @@ abstract class Customer implements ActiveRecordInterface
|
||||
$keys[11] => $this->getDiscount(),
|
||||
$keys[12] => $this->getRememberMeToken(),
|
||||
$keys[13] => $this->getRememberMeSerial(),
|
||||
$keys[14] => $this->getCreatedAt(),
|
||||
$keys[15] => $this->getUpdatedAt(),
|
||||
$keys[16] => $this->getVersion(),
|
||||
$keys[17] => $this->getVersionCreatedAt(),
|
||||
$keys[18] => $this->getVersionCreatedBy(),
|
||||
$keys[14] => $this->getEnable(),
|
||||
$keys[15] => $this->getConfirmationToken(),
|
||||
$keys[16] => $this->getCreatedAt(),
|
||||
$keys[17] => $this->getUpdatedAt(),
|
||||
$keys[18] => $this->getVersion(),
|
||||
$keys[19] => $this->getVersionCreatedAt(),
|
||||
$keys[20] => $this->getVersionCreatedBy(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||
@@ -2099,18 +2207,24 @@ abstract class Customer implements ActiveRecordInterface
|
||||
$this->setRememberMeSerial($value);
|
||||
break;
|
||||
case 14:
|
||||
$this->setCreatedAt($value);
|
||||
$this->setEnable($value);
|
||||
break;
|
||||
case 15:
|
||||
$this->setUpdatedAt($value);
|
||||
$this->setConfirmationToken($value);
|
||||
break;
|
||||
case 16:
|
||||
$this->setVersion($value);
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 17:
|
||||
$this->setVersionCreatedAt($value);
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
case 18:
|
||||
$this->setVersion($value);
|
||||
break;
|
||||
case 19:
|
||||
$this->setVersionCreatedAt($value);
|
||||
break;
|
||||
case 20:
|
||||
$this->setVersionCreatedBy($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -2151,11 +2265,13 @@ abstract class Customer implements ActiveRecordInterface
|
||||
if (array_key_exists($keys[11], $arr)) $this->setDiscount($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[12], $arr)) $this->setRememberMeToken($arr[$keys[12]]);
|
||||
if (array_key_exists($keys[13], $arr)) $this->setRememberMeSerial($arr[$keys[13]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setCreatedAt($arr[$keys[14]]);
|
||||
if (array_key_exists($keys[15], $arr)) $this->setUpdatedAt($arr[$keys[15]]);
|
||||
if (array_key_exists($keys[16], $arr)) $this->setVersion($arr[$keys[16]]);
|
||||
if (array_key_exists($keys[17], $arr)) $this->setVersionCreatedAt($arr[$keys[17]]);
|
||||
if (array_key_exists($keys[18], $arr)) $this->setVersionCreatedBy($arr[$keys[18]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setEnable($arr[$keys[14]]);
|
||||
if (array_key_exists($keys[15], $arr)) $this->setConfirmationToken($arr[$keys[15]]);
|
||||
if (array_key_exists($keys[16], $arr)) $this->setCreatedAt($arr[$keys[16]]);
|
||||
if (array_key_exists($keys[17], $arr)) $this->setUpdatedAt($arr[$keys[17]]);
|
||||
if (array_key_exists($keys[18], $arr)) $this->setVersion($arr[$keys[18]]);
|
||||
if (array_key_exists($keys[19], $arr)) $this->setVersionCreatedAt($arr[$keys[19]]);
|
||||
if (array_key_exists($keys[20], $arr)) $this->setVersionCreatedBy($arr[$keys[20]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2181,6 +2297,8 @@ abstract class Customer implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CustomerTableMap::DISCOUNT)) $criteria->add(CustomerTableMap::DISCOUNT, $this->discount);
|
||||
if ($this->isColumnModified(CustomerTableMap::REMEMBER_ME_TOKEN)) $criteria->add(CustomerTableMap::REMEMBER_ME_TOKEN, $this->remember_me_token);
|
||||
if ($this->isColumnModified(CustomerTableMap::REMEMBER_ME_SERIAL)) $criteria->add(CustomerTableMap::REMEMBER_ME_SERIAL, $this->remember_me_serial);
|
||||
if ($this->isColumnModified(CustomerTableMap::ENABLE)) $criteria->add(CustomerTableMap::ENABLE, $this->enable);
|
||||
if ($this->isColumnModified(CustomerTableMap::CONFIRMATION_TOKEN)) $criteria->add(CustomerTableMap::CONFIRMATION_TOKEN, $this->confirmation_token);
|
||||
if ($this->isColumnModified(CustomerTableMap::CREATED_AT)) $criteria->add(CustomerTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(CustomerTableMap::UPDATED_AT)) $criteria->add(CustomerTableMap::UPDATED_AT, $this->updated_at);
|
||||
if ($this->isColumnModified(CustomerTableMap::VERSION)) $criteria->add(CustomerTableMap::VERSION, $this->version);
|
||||
@@ -2262,6 +2380,8 @@ abstract class Customer implements ActiveRecordInterface
|
||||
$copyObj->setDiscount($this->getDiscount());
|
||||
$copyObj->setRememberMeToken($this->getRememberMeToken());
|
||||
$copyObj->setRememberMeSerial($this->getRememberMeSerial());
|
||||
$copyObj->setEnable($this->getEnable());
|
||||
$copyObj->setConfirmationToken($this->getConfirmationToken());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
$copyObj->setVersion($this->getVersion());
|
||||
@@ -4111,6 +4231,8 @@ abstract class Customer implements ActiveRecordInterface
|
||||
$this->discount = null;
|
||||
$this->remember_me_token = null;
|
||||
$this->remember_me_serial = null;
|
||||
$this->enable = null;
|
||||
$this->confirmation_token = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
$this->version = null;
|
||||
@@ -4275,6 +4397,8 @@ abstract class Customer implements ActiveRecordInterface
|
||||
$version->setDiscount($this->getDiscount());
|
||||
$version->setRememberMeToken($this->getRememberMeToken());
|
||||
$version->setRememberMeSerial($this->getRememberMeSerial());
|
||||
$version->setEnable($this->getEnable());
|
||||
$version->setConfirmationToken($this->getConfirmationToken());
|
||||
$version->setCreatedAt($this->getCreatedAt());
|
||||
$version->setUpdatedAt($this->getUpdatedAt());
|
||||
$version->setVersion($this->getVersion());
|
||||
@@ -4335,6 +4459,8 @@ abstract class Customer implements ActiveRecordInterface
|
||||
$this->setDiscount($version->getDiscount());
|
||||
$this->setRememberMeToken($version->getRememberMeToken());
|
||||
$this->setRememberMeSerial($version->getRememberMeSerial());
|
||||
$this->setEnable($version->getEnable());
|
||||
$this->setConfirmationToken($version->getConfirmationToken());
|
||||
$this->setCreatedAt($version->getCreatedAt());
|
||||
$this->setUpdatedAt($version->getUpdatedAt());
|
||||
$this->setVersion($version->getVersion());
|
||||
|
||||
@@ -35,6 +35,8 @@ use Thelia\Model\Map\CustomerTableMap;
|
||||
* @method ChildCustomerQuery orderByDiscount($order = Criteria::ASC) Order by the discount column
|
||||
* @method ChildCustomerQuery orderByRememberMeToken($order = Criteria::ASC) Order by the remember_me_token column
|
||||
* @method ChildCustomerQuery orderByRememberMeSerial($order = Criteria::ASC) Order by the remember_me_serial column
|
||||
* @method ChildCustomerQuery orderByEnable($order = Criteria::ASC) Order by the enable column
|
||||
* @method ChildCustomerQuery orderByConfirmationToken($order = Criteria::ASC) Order by the confirmation_token column
|
||||
* @method ChildCustomerQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildCustomerQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
* @method ChildCustomerQuery orderByVersion($order = Criteria::ASC) Order by the version column
|
||||
@@ -55,6 +57,8 @@ use Thelia\Model\Map\CustomerTableMap;
|
||||
* @method ChildCustomerQuery groupByDiscount() Group by the discount column
|
||||
* @method ChildCustomerQuery groupByRememberMeToken() Group by the remember_me_token column
|
||||
* @method ChildCustomerQuery groupByRememberMeSerial() Group by the remember_me_serial column
|
||||
* @method ChildCustomerQuery groupByEnable() Group by the enable column
|
||||
* @method ChildCustomerQuery groupByConfirmationToken() Group by the confirmation_token column
|
||||
* @method ChildCustomerQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildCustomerQuery groupByUpdatedAt() Group by the updated_at column
|
||||
* @method ChildCustomerQuery groupByVersion() Group by the version column
|
||||
@@ -110,6 +114,8 @@ use Thelia\Model\Map\CustomerTableMap;
|
||||
* @method ChildCustomer findOneByDiscount(string $discount) Return the first ChildCustomer filtered by the discount column
|
||||
* @method ChildCustomer findOneByRememberMeToken(string $remember_me_token) Return the first ChildCustomer filtered by the remember_me_token column
|
||||
* @method ChildCustomer findOneByRememberMeSerial(string $remember_me_serial) Return the first ChildCustomer filtered by the remember_me_serial column
|
||||
* @method ChildCustomer findOneByEnable(int $enable) Return the first ChildCustomer filtered by the enable column
|
||||
* @method ChildCustomer findOneByConfirmationToken(string $confirmation_token) Return the first ChildCustomer filtered by the confirmation_token column
|
||||
* @method ChildCustomer findOneByCreatedAt(string $created_at) Return the first ChildCustomer filtered by the created_at column
|
||||
* @method ChildCustomer findOneByUpdatedAt(string $updated_at) Return the first ChildCustomer filtered by the updated_at column
|
||||
* @method ChildCustomer findOneByVersion(int $version) Return the first ChildCustomer filtered by the version column
|
||||
@@ -130,6 +136,8 @@ use Thelia\Model\Map\CustomerTableMap;
|
||||
* @method array findByDiscount(string $discount) Return ChildCustomer objects filtered by the discount column
|
||||
* @method array findByRememberMeToken(string $remember_me_token) Return ChildCustomer objects filtered by the remember_me_token column
|
||||
* @method array findByRememberMeSerial(string $remember_me_serial) Return ChildCustomer objects filtered by the remember_me_serial column
|
||||
* @method array findByEnable(int $enable) Return ChildCustomer objects filtered by the enable column
|
||||
* @method array findByConfirmationToken(string $confirmation_token) Return ChildCustomer objects filtered by the confirmation_token column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildCustomer objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildCustomer objects filtered by the updated_at column
|
||||
* @method array findByVersion(int $version) Return ChildCustomer objects filtered by the version column
|
||||
@@ -230,7 +238,7 @@ abstract class CustomerQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `TITLE_ID`, `LANG_ID`, `REF`, `FIRSTNAME`, `LASTNAME`, `EMAIL`, `PASSWORD`, `ALGO`, `RESELLER`, `SPONSOR`, `DISCOUNT`, `REMEMBER_ME_TOKEN`, `REMEMBER_ME_SERIAL`, `CREATED_AT`, `UPDATED_AT`, `VERSION`, `VERSION_CREATED_AT`, `VERSION_CREATED_BY` FROM `customer` WHERE `ID` = :p0';
|
||||
$sql = 'SELECT `ID`, `TITLE_ID`, `LANG_ID`, `REF`, `FIRSTNAME`, `LASTNAME`, `EMAIL`, `PASSWORD`, `ALGO`, `RESELLER`, `SPONSOR`, `DISCOUNT`, `REMEMBER_ME_TOKEN`, `REMEMBER_ME_SERIAL`, `ENABLE`, `CONFIRMATION_TOKEN`, `CREATED_AT`, `UPDATED_AT`, `VERSION`, `VERSION_CREATED_AT`, `VERSION_CREATED_BY` FROM `customer` WHERE `ID` = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -789,6 +797,76 @@ abstract class CustomerQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CustomerTableMap::REMEMBER_ME_SERIAL, $rememberMeSerial, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the enable column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByEnable(1234); // WHERE enable = 1234
|
||||
* $query->filterByEnable(array(12, 34)); // WHERE enable IN (12, 34)
|
||||
* $query->filterByEnable(array('min' => 12)); // WHERE enable > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $enable 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 ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByEnable($enable = null, $comparison = null)
|
||||
{
|
||||
if (is_array($enable)) {
|
||||
$useMinMax = false;
|
||||
if (isset($enable['min'])) {
|
||||
$this->addUsingAlias(CustomerTableMap::ENABLE, $enable['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($enable['max'])) {
|
||||
$this->addUsingAlias(CustomerTableMap::ENABLE, $enable['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::ENABLE, $enable, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the confirmation_token column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByConfirmationToken('fooValue'); // WHERE confirmation_token = 'fooValue'
|
||||
* $query->filterByConfirmationToken('%fooValue%'); // WHERE confirmation_token LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $confirmationToken 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 ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByConfirmationToken($confirmationToken = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($confirmationToken)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $confirmationToken)) {
|
||||
$confirmationToken = str_replace('*', '%', $confirmationToken);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::CONFIRMATION_TOKEN, $confirmationToken, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
|
||||
@@ -140,6 +140,19 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
*/
|
||||
protected $remember_me_serial;
|
||||
|
||||
/**
|
||||
* The value for the enable field.
|
||||
* Note: this column has a database default value of: 0
|
||||
* @var int
|
||||
*/
|
||||
protected $enable;
|
||||
|
||||
/**
|
||||
* The value for the confirmation_token field.
|
||||
* @var string
|
||||
*/
|
||||
protected $confirmation_token;
|
||||
|
||||
/**
|
||||
* The value for the created_at field.
|
||||
* @var string
|
||||
@@ -219,6 +232,7 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
public function applyDefaultValues()
|
||||
{
|
||||
$this->discount = '0.000000';
|
||||
$this->enable = 0;
|
||||
$this->version = 0;
|
||||
}
|
||||
|
||||
@@ -636,6 +650,28 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
return $this->remember_me_serial;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [enable] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getEnable()
|
||||
{
|
||||
|
||||
return $this->enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [confirmation_token] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getConfirmationToken()
|
||||
{
|
||||
|
||||
return $this->confirmation_token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [created_at] column value.
|
||||
*
|
||||
@@ -1074,6 +1110,48 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setRememberMeSerial()
|
||||
|
||||
/**
|
||||
* Set the value of [enable] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\CustomerVersion The current object (for fluent API support)
|
||||
*/
|
||||
public function setEnable($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->enable !== $v) {
|
||||
$this->enable = $v;
|
||||
$this->modifiedColumns[CustomerVersionTableMap::ENABLE] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setEnable()
|
||||
|
||||
/**
|
||||
* Set the value of [confirmation_token] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CustomerVersion The current object (for fluent API support)
|
||||
*/
|
||||
public function setConfirmationToken($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->confirmation_token !== $v) {
|
||||
$this->confirmation_token = $v;
|
||||
$this->modifiedColumns[CustomerVersionTableMap::CONFIRMATION_TOKEN] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setConfirmationToken()
|
||||
|
||||
/**
|
||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||
*
|
||||
@@ -1297,6 +1375,10 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->enable !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->version !== 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -1370,35 +1452,41 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CustomerVersionTableMap::translateFieldName('RememberMeSerial', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->remember_me_serial = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CustomerVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CustomerVersionTableMap::translateFieldName('Enable', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->enable = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : CustomerVersionTableMap::translateFieldName('ConfirmationToken', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->confirmation_token = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 16 + $startcol : CustomerVersionTableMap::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 ? 15 + $startcol : CustomerVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : CustomerVersionTableMap::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 ? 16 + $startcol : CustomerVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 18 + $startcol : CustomerVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : CustomerVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 19 + $startcol : CustomerVersionTableMap::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 ? 18 + $startcol : CustomerVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 20 + $startcol : CustomerVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version_created_by = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 19 + $startcol : CustomerVersionTableMap::translateFieldName('OrderIds', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 21 + $startcol : CustomerVersionTableMap::translateFieldName('OrderIds', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->order_ids = $col;
|
||||
$this->order_ids_unserialized = null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 20 + $startcol : CustomerVersionTableMap::translateFieldName('OrderVersions', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 22 + $startcol : CustomerVersionTableMap::translateFieldName('OrderVersions', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->order_versions = $col;
|
||||
$this->order_versions_unserialized = null;
|
||||
$this->resetModified();
|
||||
@@ -1409,7 +1497,7 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 21; // 21 = CustomerVersionTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 23; // 23 = CustomerVersionTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\CustomerVersion object", 0, $e);
|
||||
@@ -1672,6 +1760,12 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CustomerVersionTableMap::REMEMBER_ME_SERIAL)) {
|
||||
$modifiedColumns[':p' . $index++] = '`REMEMBER_ME_SERIAL`';
|
||||
}
|
||||
if ($this->isColumnModified(CustomerVersionTableMap::ENABLE)) {
|
||||
$modifiedColumns[':p' . $index++] = '`ENABLE`';
|
||||
}
|
||||
if ($this->isColumnModified(CustomerVersionTableMap::CONFIRMATION_TOKEN)) {
|
||||
$modifiedColumns[':p' . $index++] = '`CONFIRMATION_TOKEN`';
|
||||
}
|
||||
if ($this->isColumnModified(CustomerVersionTableMap::CREATED_AT)) {
|
||||
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
|
||||
}
|
||||
@@ -1746,6 +1840,12 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
case '`REMEMBER_ME_SERIAL`':
|
||||
$stmt->bindValue($identifier, $this->remember_me_serial, PDO::PARAM_STR);
|
||||
break;
|
||||
case '`ENABLE`':
|
||||
$stmt->bindValue($identifier, $this->enable, PDO::PARAM_INT);
|
||||
break;
|
||||
case '`CONFIRMATION_TOKEN`':
|
||||
$stmt->bindValue($identifier, $this->confirmation_token, 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;
|
||||
@@ -1865,24 +1965,30 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
return $this->getRememberMeSerial();
|
||||
break;
|
||||
case 14:
|
||||
return $this->getCreatedAt();
|
||||
return $this->getEnable();
|
||||
break;
|
||||
case 15:
|
||||
return $this->getUpdatedAt();
|
||||
return $this->getConfirmationToken();
|
||||
break;
|
||||
case 16:
|
||||
return $this->getVersion();
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 17:
|
||||
return $this->getVersionCreatedAt();
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
case 18:
|
||||
return $this->getVersionCreatedBy();
|
||||
return $this->getVersion();
|
||||
break;
|
||||
case 19:
|
||||
return $this->getOrderIds();
|
||||
return $this->getVersionCreatedAt();
|
||||
break;
|
||||
case 20:
|
||||
return $this->getVersionCreatedBy();
|
||||
break;
|
||||
case 21:
|
||||
return $this->getOrderIds();
|
||||
break;
|
||||
case 22:
|
||||
return $this->getOrderVersions();
|
||||
break;
|
||||
default:
|
||||
@@ -1928,13 +2034,15 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
$keys[11] => $this->getDiscount(),
|
||||
$keys[12] => $this->getRememberMeToken(),
|
||||
$keys[13] => $this->getRememberMeSerial(),
|
||||
$keys[14] => $this->getCreatedAt(),
|
||||
$keys[15] => $this->getUpdatedAt(),
|
||||
$keys[16] => $this->getVersion(),
|
||||
$keys[17] => $this->getVersionCreatedAt(),
|
||||
$keys[18] => $this->getVersionCreatedBy(),
|
||||
$keys[19] => $this->getOrderIds(),
|
||||
$keys[20] => $this->getOrderVersions(),
|
||||
$keys[14] => $this->getEnable(),
|
||||
$keys[15] => $this->getConfirmationToken(),
|
||||
$keys[16] => $this->getCreatedAt(),
|
||||
$keys[17] => $this->getUpdatedAt(),
|
||||
$keys[18] => $this->getVersion(),
|
||||
$keys[19] => $this->getVersionCreatedAt(),
|
||||
$keys[20] => $this->getVersionCreatedBy(),
|
||||
$keys[21] => $this->getOrderIds(),
|
||||
$keys[22] => $this->getOrderVersions(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||
@@ -2022,28 +2130,34 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
$this->setRememberMeSerial($value);
|
||||
break;
|
||||
case 14:
|
||||
$this->setCreatedAt($value);
|
||||
$this->setEnable($value);
|
||||
break;
|
||||
case 15:
|
||||
$this->setUpdatedAt($value);
|
||||
$this->setConfirmationToken($value);
|
||||
break;
|
||||
case 16:
|
||||
$this->setVersion($value);
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 17:
|
||||
$this->setVersionCreatedAt($value);
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
case 18:
|
||||
$this->setVersionCreatedBy($value);
|
||||
$this->setVersion($value);
|
||||
break;
|
||||
case 19:
|
||||
$this->setVersionCreatedAt($value);
|
||||
break;
|
||||
case 20:
|
||||
$this->setVersionCreatedBy($value);
|
||||
break;
|
||||
case 21:
|
||||
if (!is_array($value)) {
|
||||
$v = trim(substr($value, 2, -2));
|
||||
$value = $v ? explode(' | ', $v) : array();
|
||||
}
|
||||
$this->setOrderIds($value);
|
||||
break;
|
||||
case 20:
|
||||
case 22:
|
||||
if (!is_array($value)) {
|
||||
$v = trim(substr($value, 2, -2));
|
||||
$value = $v ? explode(' | ', $v) : array();
|
||||
@@ -2088,13 +2202,15 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
if (array_key_exists($keys[11], $arr)) $this->setDiscount($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[12], $arr)) $this->setRememberMeToken($arr[$keys[12]]);
|
||||
if (array_key_exists($keys[13], $arr)) $this->setRememberMeSerial($arr[$keys[13]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setCreatedAt($arr[$keys[14]]);
|
||||
if (array_key_exists($keys[15], $arr)) $this->setUpdatedAt($arr[$keys[15]]);
|
||||
if (array_key_exists($keys[16], $arr)) $this->setVersion($arr[$keys[16]]);
|
||||
if (array_key_exists($keys[17], $arr)) $this->setVersionCreatedAt($arr[$keys[17]]);
|
||||
if (array_key_exists($keys[18], $arr)) $this->setVersionCreatedBy($arr[$keys[18]]);
|
||||
if (array_key_exists($keys[19], $arr)) $this->setOrderIds($arr[$keys[19]]);
|
||||
if (array_key_exists($keys[20], $arr)) $this->setOrderVersions($arr[$keys[20]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setEnable($arr[$keys[14]]);
|
||||
if (array_key_exists($keys[15], $arr)) $this->setConfirmationToken($arr[$keys[15]]);
|
||||
if (array_key_exists($keys[16], $arr)) $this->setCreatedAt($arr[$keys[16]]);
|
||||
if (array_key_exists($keys[17], $arr)) $this->setUpdatedAt($arr[$keys[17]]);
|
||||
if (array_key_exists($keys[18], $arr)) $this->setVersion($arr[$keys[18]]);
|
||||
if (array_key_exists($keys[19], $arr)) $this->setVersionCreatedAt($arr[$keys[19]]);
|
||||
if (array_key_exists($keys[20], $arr)) $this->setVersionCreatedBy($arr[$keys[20]]);
|
||||
if (array_key_exists($keys[21], $arr)) $this->setOrderIds($arr[$keys[21]]);
|
||||
if (array_key_exists($keys[22], $arr)) $this->setOrderVersions($arr[$keys[22]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2120,6 +2236,8 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CustomerVersionTableMap::DISCOUNT)) $criteria->add(CustomerVersionTableMap::DISCOUNT, $this->discount);
|
||||
if ($this->isColumnModified(CustomerVersionTableMap::REMEMBER_ME_TOKEN)) $criteria->add(CustomerVersionTableMap::REMEMBER_ME_TOKEN, $this->remember_me_token);
|
||||
if ($this->isColumnModified(CustomerVersionTableMap::REMEMBER_ME_SERIAL)) $criteria->add(CustomerVersionTableMap::REMEMBER_ME_SERIAL, $this->remember_me_serial);
|
||||
if ($this->isColumnModified(CustomerVersionTableMap::ENABLE)) $criteria->add(CustomerVersionTableMap::ENABLE, $this->enable);
|
||||
if ($this->isColumnModified(CustomerVersionTableMap::CONFIRMATION_TOKEN)) $criteria->add(CustomerVersionTableMap::CONFIRMATION_TOKEN, $this->confirmation_token);
|
||||
if ($this->isColumnModified(CustomerVersionTableMap::CREATED_AT)) $criteria->add(CustomerVersionTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(CustomerVersionTableMap::UPDATED_AT)) $criteria->add(CustomerVersionTableMap::UPDATED_AT, $this->updated_at);
|
||||
if ($this->isColumnModified(CustomerVersionTableMap::VERSION)) $criteria->add(CustomerVersionTableMap::VERSION, $this->version);
|
||||
@@ -2211,6 +2329,8 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
$copyObj->setDiscount($this->getDiscount());
|
||||
$copyObj->setRememberMeToken($this->getRememberMeToken());
|
||||
$copyObj->setRememberMeSerial($this->getRememberMeSerial());
|
||||
$copyObj->setEnable($this->getEnable());
|
||||
$copyObj->setConfirmationToken($this->getConfirmationToken());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
$copyObj->setVersion($this->getVersion());
|
||||
@@ -2315,6 +2435,8 @@ abstract class CustomerVersion implements ActiveRecordInterface
|
||||
$this->discount = null;
|
||||
$this->remember_me_token = null;
|
||||
$this->remember_me_serial = null;
|
||||
$this->enable = null;
|
||||
$this->confirmation_token = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
$this->version = null;
|
||||
|
||||
@@ -35,6 +35,8 @@ use Thelia\Model\Map\CustomerVersionTableMap;
|
||||
* @method ChildCustomerVersionQuery orderByDiscount($order = Criteria::ASC) Order by the discount column
|
||||
* @method ChildCustomerVersionQuery orderByRememberMeToken($order = Criteria::ASC) Order by the remember_me_token column
|
||||
* @method ChildCustomerVersionQuery orderByRememberMeSerial($order = Criteria::ASC) Order by the remember_me_serial column
|
||||
* @method ChildCustomerVersionQuery orderByEnable($order = Criteria::ASC) Order by the enable column
|
||||
* @method ChildCustomerVersionQuery orderByConfirmationToken($order = Criteria::ASC) Order by the confirmation_token column
|
||||
* @method ChildCustomerVersionQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildCustomerVersionQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
* @method ChildCustomerVersionQuery orderByVersion($order = Criteria::ASC) Order by the version column
|
||||
@@ -57,6 +59,8 @@ use Thelia\Model\Map\CustomerVersionTableMap;
|
||||
* @method ChildCustomerVersionQuery groupByDiscount() Group by the discount column
|
||||
* @method ChildCustomerVersionQuery groupByRememberMeToken() Group by the remember_me_token column
|
||||
* @method ChildCustomerVersionQuery groupByRememberMeSerial() Group by the remember_me_serial column
|
||||
* @method ChildCustomerVersionQuery groupByEnable() Group by the enable column
|
||||
* @method ChildCustomerVersionQuery groupByConfirmationToken() Group by the confirmation_token column
|
||||
* @method ChildCustomerVersionQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildCustomerVersionQuery groupByUpdatedAt() Group by the updated_at column
|
||||
* @method ChildCustomerVersionQuery groupByVersion() Group by the version column
|
||||
@@ -90,6 +94,8 @@ use Thelia\Model\Map\CustomerVersionTableMap;
|
||||
* @method ChildCustomerVersion findOneByDiscount(string $discount) Return the first ChildCustomerVersion filtered by the discount column
|
||||
* @method ChildCustomerVersion findOneByRememberMeToken(string $remember_me_token) Return the first ChildCustomerVersion filtered by the remember_me_token column
|
||||
* @method ChildCustomerVersion findOneByRememberMeSerial(string $remember_me_serial) Return the first ChildCustomerVersion filtered by the remember_me_serial column
|
||||
* @method ChildCustomerVersion findOneByEnable(int $enable) Return the first ChildCustomerVersion filtered by the enable column
|
||||
* @method ChildCustomerVersion findOneByConfirmationToken(string $confirmation_token) Return the first ChildCustomerVersion filtered by the confirmation_token column
|
||||
* @method ChildCustomerVersion findOneByCreatedAt(string $created_at) Return the first ChildCustomerVersion filtered by the created_at column
|
||||
* @method ChildCustomerVersion findOneByUpdatedAt(string $updated_at) Return the first ChildCustomerVersion filtered by the updated_at column
|
||||
* @method ChildCustomerVersion findOneByVersion(int $version) Return the first ChildCustomerVersion filtered by the version column
|
||||
@@ -112,6 +118,8 @@ use Thelia\Model\Map\CustomerVersionTableMap;
|
||||
* @method array findByDiscount(string $discount) Return ChildCustomerVersion objects filtered by the discount column
|
||||
* @method array findByRememberMeToken(string $remember_me_token) Return ChildCustomerVersion objects filtered by the remember_me_token column
|
||||
* @method array findByRememberMeSerial(string $remember_me_serial) Return ChildCustomerVersion objects filtered by the remember_me_serial column
|
||||
* @method array findByEnable(int $enable) Return ChildCustomerVersion objects filtered by the enable column
|
||||
* @method array findByConfirmationToken(string $confirmation_token) Return ChildCustomerVersion objects filtered by the confirmation_token column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildCustomerVersion objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildCustomerVersion objects filtered by the updated_at column
|
||||
* @method array findByVersion(int $version) Return ChildCustomerVersion objects filtered by the version column
|
||||
@@ -207,7 +215,7 @@ abstract class CustomerVersionQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `TITLE_ID`, `LANG_ID`, `REF`, `FIRSTNAME`, `LASTNAME`, `EMAIL`, `PASSWORD`, `ALGO`, `RESELLER`, `SPONSOR`, `DISCOUNT`, `REMEMBER_ME_TOKEN`, `REMEMBER_ME_SERIAL`, `CREATED_AT`, `UPDATED_AT`, `VERSION`, `VERSION_CREATED_AT`, `VERSION_CREATED_BY`, `ORDER_IDS`, `ORDER_VERSIONS` FROM `customer_version` WHERE `ID` = :p0 AND `VERSION` = :p1';
|
||||
$sql = 'SELECT `ID`, `TITLE_ID`, `LANG_ID`, `REF`, `FIRSTNAME`, `LASTNAME`, `EMAIL`, `PASSWORD`, `ALGO`, `RESELLER`, `SPONSOR`, `DISCOUNT`, `REMEMBER_ME_TOKEN`, `REMEMBER_ME_SERIAL`, `ENABLE`, `CONFIRMATION_TOKEN`, `CREATED_AT`, `UPDATED_AT`, `VERSION`, `VERSION_CREATED_AT`, `VERSION_CREATED_BY`, `ORDER_IDS`, `ORDER_VERSIONS` FROM `customer_version` WHERE `ID` = :p0 AND `VERSION` = :p1';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||
@@ -776,6 +784,76 @@ abstract class CustomerVersionQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CustomerVersionTableMap::REMEMBER_ME_SERIAL, $rememberMeSerial, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the enable column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByEnable(1234); // WHERE enable = 1234
|
||||
* $query->filterByEnable(array(12, 34)); // WHERE enable IN (12, 34)
|
||||
* $query->filterByEnable(array('min' => 12)); // WHERE enable > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $enable 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 ChildCustomerVersionQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByEnable($enable = null, $comparison = null)
|
||||
{
|
||||
if (is_array($enable)) {
|
||||
$useMinMax = false;
|
||||
if (isset($enable['min'])) {
|
||||
$this->addUsingAlias(CustomerVersionTableMap::ENABLE, $enable['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($enable['max'])) {
|
||||
$this->addUsingAlias(CustomerVersionTableMap::ENABLE, $enable['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerVersionTableMap::ENABLE, $enable, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the confirmation_token column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByConfirmationToken('fooValue'); // WHERE confirmation_token = 'fooValue'
|
||||
* $query->filterByConfirmationToken('%fooValue%'); // WHERE confirmation_token LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $confirmationToken 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 ChildCustomerVersionQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByConfirmationToken($confirmationToken = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($confirmationToken)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $confirmationToken)) {
|
||||
$confirmationToken = str_replace('*', '%', $confirmationToken);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerVersionTableMap::CONFIRMATION_TOKEN, $confirmationToken, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
|
||||
@@ -131,6 +131,20 @@ abstract class Module implements ActiveRecordInterface
|
||||
*/
|
||||
protected $full_namespace;
|
||||
|
||||
/**
|
||||
* The value for the mandatory field.
|
||||
* Note: this column has a database default value of: 0
|
||||
* @var int
|
||||
*/
|
||||
protected $mandatory;
|
||||
|
||||
/**
|
||||
* The value for the hidden field.
|
||||
* Note: this column has a database default value of: 0
|
||||
* @var int
|
||||
*/
|
||||
protected $hidden;
|
||||
|
||||
/**
|
||||
* The value for the created_at field.
|
||||
* @var string
|
||||
@@ -340,6 +354,8 @@ abstract class Module implements ActiveRecordInterface
|
||||
{
|
||||
$this->version = '';
|
||||
$this->category = 'classic';
|
||||
$this->mandatory = 0;
|
||||
$this->hidden = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -690,6 +706,28 @@ abstract class Module implements ActiveRecordInterface
|
||||
return $this->full_namespace;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [mandatory] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getMandatory()
|
||||
{
|
||||
|
||||
return $this->mandatory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [hidden] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getHidden()
|
||||
{
|
||||
|
||||
return $this->hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [created_at] column value.
|
||||
*
|
||||
@@ -898,6 +936,48 @@ abstract class Module implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setFullNamespace()
|
||||
|
||||
/**
|
||||
* Set the value of [mandatory] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\Module The current object (for fluent API support)
|
||||
*/
|
||||
public function setMandatory($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->mandatory !== $v) {
|
||||
$this->mandatory = $v;
|
||||
$this->modifiedColumns[ModuleTableMap::MANDATORY] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setMandatory()
|
||||
|
||||
/**
|
||||
* Set the value of [hidden] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\Module The current object (for fluent API support)
|
||||
*/
|
||||
public function setHidden($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->hidden !== $v) {
|
||||
$this->hidden = $v;
|
||||
$this->modifiedColumns[ModuleTableMap::HIDDEN] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setHidden()
|
||||
|
||||
/**
|
||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||
*
|
||||
@@ -958,6 +1038,14 @@ abstract class Module implements ActiveRecordInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->mandatory !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->hidden !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// otherwise, everything was equal, so return TRUE
|
||||
return true;
|
||||
} // hasOnlyDefaultValues()
|
||||
@@ -1009,13 +1097,19 @@ abstract class Module implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : ModuleTableMap::translateFieldName('FullNamespace', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->full_namespace = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : ModuleTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : ModuleTableMap::translateFieldName('Mandatory', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->mandatory = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : ModuleTableMap::translateFieldName('Hidden', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->hidden = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : ModuleTableMap::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 ? 9 + $startcol : ModuleTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : ModuleTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
@@ -1028,7 +1122,7 @@ abstract class Module implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 10; // 10 = ModuleTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 12; // 12 = ModuleTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\Module object", 0, $e);
|
||||
@@ -1565,6 +1659,12 @@ abstract class Module implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(ModuleTableMap::FULL_NAMESPACE)) {
|
||||
$modifiedColumns[':p' . $index++] = '`FULL_NAMESPACE`';
|
||||
}
|
||||
if ($this->isColumnModified(ModuleTableMap::MANDATORY)) {
|
||||
$modifiedColumns[':p' . $index++] = '`MANDATORY`';
|
||||
}
|
||||
if ($this->isColumnModified(ModuleTableMap::HIDDEN)) {
|
||||
$modifiedColumns[':p' . $index++] = '`HIDDEN`';
|
||||
}
|
||||
if ($this->isColumnModified(ModuleTableMap::CREATED_AT)) {
|
||||
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
|
||||
}
|
||||
@@ -1606,6 +1706,12 @@ abstract class Module implements ActiveRecordInterface
|
||||
case '`FULL_NAMESPACE`':
|
||||
$stmt->bindValue($identifier, $this->full_namespace, PDO::PARAM_STR);
|
||||
break;
|
||||
case '`MANDATORY`':
|
||||
$stmt->bindValue($identifier, $this->mandatory, PDO::PARAM_INT);
|
||||
break;
|
||||
case '`HIDDEN`':
|
||||
$stmt->bindValue($identifier, $this->hidden, PDO::PARAM_INT);
|
||||
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;
|
||||
@@ -1699,9 +1805,15 @@ abstract class Module implements ActiveRecordInterface
|
||||
return $this->getFullNamespace();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getCreatedAt();
|
||||
return $this->getMandatory();
|
||||
break;
|
||||
case 9:
|
||||
return $this->getHidden();
|
||||
break;
|
||||
case 10:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 11:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
default:
|
||||
@@ -1741,8 +1853,10 @@ abstract class Module implements ActiveRecordInterface
|
||||
$keys[5] => $this->getActivate(),
|
||||
$keys[6] => $this->getPosition(),
|
||||
$keys[7] => $this->getFullNamespace(),
|
||||
$keys[8] => $this->getCreatedAt(),
|
||||
$keys[9] => $this->getUpdatedAt(),
|
||||
$keys[8] => $this->getMandatory(),
|
||||
$keys[9] => $this->getHidden(),
|
||||
$keys[10] => $this->getCreatedAt(),
|
||||
$keys[11] => $this->getUpdatedAt(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||
@@ -1842,9 +1956,15 @@ abstract class Module implements ActiveRecordInterface
|
||||
$this->setFullNamespace($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setCreatedAt($value);
|
||||
$this->setMandatory($value);
|
||||
break;
|
||||
case 9:
|
||||
$this->setHidden($value);
|
||||
break;
|
||||
case 10:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 11:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1879,8 +1999,10 @@ abstract class Module implements ActiveRecordInterface
|
||||
if (array_key_exists($keys[5], $arr)) $this->setActivate($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setPosition($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setFullNamespace($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setCreatedAt($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setUpdatedAt($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setMandatory($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setHidden($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[10], $arr)) $this->setCreatedAt($arr[$keys[10]]);
|
||||
if (array_key_exists($keys[11], $arr)) $this->setUpdatedAt($arr[$keys[11]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1900,6 +2022,8 @@ abstract class Module implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(ModuleTableMap::ACTIVATE)) $criteria->add(ModuleTableMap::ACTIVATE, $this->activate);
|
||||
if ($this->isColumnModified(ModuleTableMap::POSITION)) $criteria->add(ModuleTableMap::POSITION, $this->position);
|
||||
if ($this->isColumnModified(ModuleTableMap::FULL_NAMESPACE)) $criteria->add(ModuleTableMap::FULL_NAMESPACE, $this->full_namespace);
|
||||
if ($this->isColumnModified(ModuleTableMap::MANDATORY)) $criteria->add(ModuleTableMap::MANDATORY, $this->mandatory);
|
||||
if ($this->isColumnModified(ModuleTableMap::HIDDEN)) $criteria->add(ModuleTableMap::HIDDEN, $this->hidden);
|
||||
if ($this->isColumnModified(ModuleTableMap::CREATED_AT)) $criteria->add(ModuleTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(ModuleTableMap::UPDATED_AT)) $criteria->add(ModuleTableMap::UPDATED_AT, $this->updated_at);
|
||||
|
||||
@@ -1972,6 +2096,8 @@ abstract class Module implements ActiveRecordInterface
|
||||
$copyObj->setActivate($this->getActivate());
|
||||
$copyObj->setPosition($this->getPosition());
|
||||
$copyObj->setFullNamespace($this->getFullNamespace());
|
||||
$copyObj->setMandatory($this->getMandatory());
|
||||
$copyObj->setHidden($this->getHidden());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
|
||||
@@ -5551,6 +5677,8 @@ abstract class Module implements ActiveRecordInterface
|
||||
$this->activate = null;
|
||||
$this->position = null;
|
||||
$this->full_namespace = null;
|
||||
$this->mandatory = null;
|
||||
$this->hidden = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
$this->alreadyInSave = false;
|
||||
|
||||
@@ -30,6 +30,8 @@ use Thelia\Model\Map\ModuleTableMap;
|
||||
* @method ChildModuleQuery orderByActivate($order = Criteria::ASC) Order by the activate column
|
||||
* @method ChildModuleQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildModuleQuery orderByFullNamespace($order = Criteria::ASC) Order by the full_namespace column
|
||||
* @method ChildModuleQuery orderByMandatory($order = Criteria::ASC) Order by the mandatory column
|
||||
* @method ChildModuleQuery orderByHidden($order = Criteria::ASC) Order by the hidden column
|
||||
* @method ChildModuleQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildModuleQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
@@ -41,6 +43,8 @@ use Thelia\Model\Map\ModuleTableMap;
|
||||
* @method ChildModuleQuery groupByActivate() Group by the activate column
|
||||
* @method ChildModuleQuery groupByPosition() Group by the position column
|
||||
* @method ChildModuleQuery groupByFullNamespace() Group by the full_namespace column
|
||||
* @method ChildModuleQuery groupByMandatory() Group by the mandatory column
|
||||
* @method ChildModuleQuery groupByHidden() Group by the hidden column
|
||||
* @method ChildModuleQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildModuleQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
@@ -103,6 +107,8 @@ use Thelia\Model\Map\ModuleTableMap;
|
||||
* @method ChildModule findOneByActivate(int $activate) Return the first ChildModule filtered by the activate column
|
||||
* @method ChildModule findOneByPosition(int $position) Return the first ChildModule filtered by the position column
|
||||
* @method ChildModule findOneByFullNamespace(string $full_namespace) Return the first ChildModule filtered by the full_namespace column
|
||||
* @method ChildModule findOneByMandatory(int $mandatory) Return the first ChildModule filtered by the mandatory column
|
||||
* @method ChildModule findOneByHidden(int $hidden) Return the first ChildModule filtered by the hidden column
|
||||
* @method ChildModule findOneByCreatedAt(string $created_at) Return the first ChildModule filtered by the created_at column
|
||||
* @method ChildModule findOneByUpdatedAt(string $updated_at) Return the first ChildModule filtered by the updated_at column
|
||||
*
|
||||
@@ -114,6 +120,8 @@ use Thelia\Model\Map\ModuleTableMap;
|
||||
* @method array findByActivate(int $activate) Return ChildModule objects filtered by the activate column
|
||||
* @method array findByPosition(int $position) Return ChildModule objects filtered by the position column
|
||||
* @method array findByFullNamespace(string $full_namespace) Return ChildModule objects filtered by the full_namespace column
|
||||
* @method array findByMandatory(int $mandatory) Return ChildModule objects filtered by the mandatory column
|
||||
* @method array findByHidden(int $hidden) Return ChildModule objects filtered by the hidden column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildModule objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildModule objects filtered by the updated_at column
|
||||
*
|
||||
@@ -204,7 +212,7 @@ abstract class ModuleQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `CODE`, `VERSION`, `TYPE`, `CATEGORY`, `ACTIVATE`, `POSITION`, `FULL_NAMESPACE`, `CREATED_AT`, `UPDATED_AT` FROM `module` WHERE `ID` = :p0';
|
||||
$sql = 'SELECT `ID`, `CODE`, `VERSION`, `TYPE`, `CATEGORY`, `ACTIVATE`, `POSITION`, `FULL_NAMESPACE`, `MANDATORY`, `HIDDEN`, `CREATED_AT`, `UPDATED_AT` FROM `module` WHERE `ID` = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -573,6 +581,88 @@ abstract class ModuleQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(ModuleTableMap::FULL_NAMESPACE, $fullNamespace, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the mandatory column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByMandatory(1234); // WHERE mandatory = 1234
|
||||
* $query->filterByMandatory(array(12, 34)); // WHERE mandatory IN (12, 34)
|
||||
* $query->filterByMandatory(array('min' => 12)); // WHERE mandatory > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $mandatory 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 ChildModuleQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByMandatory($mandatory = null, $comparison = null)
|
||||
{
|
||||
if (is_array($mandatory)) {
|
||||
$useMinMax = false;
|
||||
if (isset($mandatory['min'])) {
|
||||
$this->addUsingAlias(ModuleTableMap::MANDATORY, $mandatory['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($mandatory['max'])) {
|
||||
$this->addUsingAlias(ModuleTableMap::MANDATORY, $mandatory['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ModuleTableMap::MANDATORY, $mandatory, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the hidden column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByHidden(1234); // WHERE hidden = 1234
|
||||
* $query->filterByHidden(array(12, 34)); // WHERE hidden IN (12, 34)
|
||||
* $query->filterByHidden(array('min' => 12)); // WHERE hidden > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $hidden 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 ChildModuleQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByHidden($hidden = null, $comparison = null)
|
||||
{
|
||||
if (is_array($hidden)) {
|
||||
$useMinMax = false;
|
||||
if (isset($hidden['min'])) {
|
||||
$this->addUsingAlias(ModuleTableMap::HIDDEN, $hidden['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($hidden['max'])) {
|
||||
$this->addUsingAlias(ModuleTableMap::HIDDEN, $hidden['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ModuleTableMap::HIDDEN, $hidden, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
|
||||
@@ -156,6 +156,13 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
*/
|
||||
protected $per_customer_usage_count;
|
||||
|
||||
/**
|
||||
* The value for the usage_canceled field.
|
||||
* Note: this column has a database default value of: false
|
||||
* @var boolean
|
||||
*/
|
||||
protected $usage_canceled;
|
||||
|
||||
/**
|
||||
* The value for the created_at field.
|
||||
* @var string
|
||||
@@ -236,6 +243,7 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
public function applyDefaultValues()
|
||||
{
|
||||
$this->amount = '0.000000';
|
||||
$this->usage_canceled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -681,6 +689,17 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
return $this->per_customer_usage_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [usage_canceled] column value.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getUsageCanceled()
|
||||
{
|
||||
|
||||
return $this->usage_canceled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [created_at] column value.
|
||||
*
|
||||
@@ -1072,6 +1091,35 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setPerCustomerUsageCount()
|
||||
|
||||
/**
|
||||
* Sets the value of the [usage_canceled] column.
|
||||
* Non-boolean arguments are converted using the following rules:
|
||||
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
|
||||
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
|
||||
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
|
||||
*
|
||||
* @param boolean|integer|string $v The new value
|
||||
* @return \Thelia\Model\OrderCoupon The current object (for fluent API support)
|
||||
*/
|
||||
public function setUsageCanceled($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
if (is_string($v)) {
|
||||
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
|
||||
} else {
|
||||
$v = (boolean) $v;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->usage_canceled !== $v) {
|
||||
$this->usage_canceled = $v;
|
||||
$this->modifiedColumns[OrderCouponTableMap::USAGE_CANCELED] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setUsageCanceled()
|
||||
|
||||
/**
|
||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||
*
|
||||
@@ -1128,6 +1176,10 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->usage_canceled !== false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// otherwise, everything was equal, so return TRUE
|
||||
return true;
|
||||
} // hasOnlyDefaultValues()
|
||||
@@ -1206,13 +1258,16 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : OrderCouponTableMap::translateFieldName('PerCustomerUsageCount', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->per_customer_usage_count = (null !== $col) ? (boolean) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : OrderCouponTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : OrderCouponTableMap::translateFieldName('UsageCanceled', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->usage_canceled = (null !== $col) ? (boolean) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 16 + $startcol : OrderCouponTableMap::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 : OrderCouponTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : OrderCouponTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
@@ -1225,7 +1280,7 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 17; // 17 = OrderCouponTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 18; // 18 = OrderCouponTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\OrderCoupon object", 0, $e);
|
||||
@@ -1600,6 +1655,9 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(OrderCouponTableMap::PER_CUSTOMER_USAGE_COUNT)) {
|
||||
$modifiedColumns[':p' . $index++] = '`PER_CUSTOMER_USAGE_COUNT`';
|
||||
}
|
||||
if ($this->isColumnModified(OrderCouponTableMap::USAGE_CANCELED)) {
|
||||
$modifiedColumns[':p' . $index++] = '`USAGE_CANCELED`';
|
||||
}
|
||||
if ($this->isColumnModified(OrderCouponTableMap::CREATED_AT)) {
|
||||
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
|
||||
}
|
||||
@@ -1662,6 +1720,9 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
case '`PER_CUSTOMER_USAGE_COUNT`':
|
||||
$stmt->bindValue($identifier, (int) $this->per_customer_usage_count, PDO::PARAM_INT);
|
||||
break;
|
||||
case '`USAGE_CANCELED`':
|
||||
$stmt->bindValue($identifier, (int) $this->usage_canceled, PDO::PARAM_INT);
|
||||
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;
|
||||
@@ -1776,9 +1837,12 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
return $this->getPerCustomerUsageCount();
|
||||
break;
|
||||
case 15:
|
||||
return $this->getCreatedAt();
|
||||
return $this->getUsageCanceled();
|
||||
break;
|
||||
case 16:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 17:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
default:
|
||||
@@ -1825,8 +1889,9 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
$keys[12] => $this->getIsAvailableOnSpecialOffers(),
|
||||
$keys[13] => $this->getSerializedConditions(),
|
||||
$keys[14] => $this->getPerCustomerUsageCount(),
|
||||
$keys[15] => $this->getCreatedAt(),
|
||||
$keys[16] => $this->getUpdatedAt(),
|
||||
$keys[15] => $this->getUsageCanceled(),
|
||||
$keys[16] => $this->getCreatedAt(),
|
||||
$keys[17] => $this->getUpdatedAt(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||
@@ -1923,9 +1988,12 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
$this->setPerCustomerUsageCount($value);
|
||||
break;
|
||||
case 15:
|
||||
$this->setCreatedAt($value);
|
||||
$this->setUsageCanceled($value);
|
||||
break;
|
||||
case 16:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 17:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1967,8 +2035,9 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
if (array_key_exists($keys[12], $arr)) $this->setIsAvailableOnSpecialOffers($arr[$keys[12]]);
|
||||
if (array_key_exists($keys[13], $arr)) $this->setSerializedConditions($arr[$keys[13]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setPerCustomerUsageCount($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[15], $arr)) $this->setUsageCanceled($arr[$keys[15]]);
|
||||
if (array_key_exists($keys[16], $arr)) $this->setCreatedAt($arr[$keys[16]]);
|
||||
if (array_key_exists($keys[17], $arr)) $this->setUpdatedAt($arr[$keys[17]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1995,6 +2064,7 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(OrderCouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS)) $criteria->add(OrderCouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS, $this->is_available_on_special_offers);
|
||||
if ($this->isColumnModified(OrderCouponTableMap::SERIALIZED_CONDITIONS)) $criteria->add(OrderCouponTableMap::SERIALIZED_CONDITIONS, $this->serialized_conditions);
|
||||
if ($this->isColumnModified(OrderCouponTableMap::PER_CUSTOMER_USAGE_COUNT)) $criteria->add(OrderCouponTableMap::PER_CUSTOMER_USAGE_COUNT, $this->per_customer_usage_count);
|
||||
if ($this->isColumnModified(OrderCouponTableMap::USAGE_CANCELED)) $criteria->add(OrderCouponTableMap::USAGE_CANCELED, $this->usage_canceled);
|
||||
if ($this->isColumnModified(OrderCouponTableMap::CREATED_AT)) $criteria->add(OrderCouponTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(OrderCouponTableMap::UPDATED_AT)) $criteria->add(OrderCouponTableMap::UPDATED_AT, $this->updated_at);
|
||||
|
||||
@@ -2074,6 +2144,7 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
$copyObj->setIsAvailableOnSpecialOffers($this->getIsAvailableOnSpecialOffers());
|
||||
$copyObj->setSerializedConditions($this->getSerializedConditions());
|
||||
$copyObj->setPerCustomerUsageCount($this->getPerCustomerUsageCount());
|
||||
$copyObj->setUsageCanceled($this->getUsageCanceled());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
|
||||
@@ -3072,6 +3143,7 @@ abstract class OrderCoupon implements ActiveRecordInterface
|
||||
$this->is_available_on_special_offers = null;
|
||||
$this->serialized_conditions = null;
|
||||
$this->per_customer_usage_count = null;
|
||||
$this->usage_canceled = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
$this->alreadyInSave = false;
|
||||
|
||||
@@ -36,6 +36,7 @@ use Thelia\Model\Map\OrderCouponTableMap;
|
||||
* @method ChildOrderCouponQuery orderByIsAvailableOnSpecialOffers($order = Criteria::ASC) Order by the is_available_on_special_offers column
|
||||
* @method ChildOrderCouponQuery orderBySerializedConditions($order = Criteria::ASC) Order by the serialized_conditions column
|
||||
* @method ChildOrderCouponQuery orderByPerCustomerUsageCount($order = Criteria::ASC) Order by the per_customer_usage_count column
|
||||
* @method ChildOrderCouponQuery orderByUsageCanceled($order = Criteria::ASC) Order by the usage_canceled column
|
||||
* @method ChildOrderCouponQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildOrderCouponQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
@@ -54,6 +55,7 @@ use Thelia\Model\Map\OrderCouponTableMap;
|
||||
* @method ChildOrderCouponQuery groupByIsAvailableOnSpecialOffers() Group by the is_available_on_special_offers column
|
||||
* @method ChildOrderCouponQuery groupBySerializedConditions() Group by the serialized_conditions column
|
||||
* @method ChildOrderCouponQuery groupByPerCustomerUsageCount() Group by the per_customer_usage_count column
|
||||
* @method ChildOrderCouponQuery groupByUsageCanceled() Group by the usage_canceled column
|
||||
* @method ChildOrderCouponQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildOrderCouponQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
@@ -91,6 +93,7 @@ use Thelia\Model\Map\OrderCouponTableMap;
|
||||
* @method ChildOrderCoupon findOneByIsAvailableOnSpecialOffers(boolean $is_available_on_special_offers) Return the first ChildOrderCoupon filtered by the is_available_on_special_offers column
|
||||
* @method ChildOrderCoupon findOneBySerializedConditions(string $serialized_conditions) Return the first ChildOrderCoupon filtered by the serialized_conditions column
|
||||
* @method ChildOrderCoupon findOneByPerCustomerUsageCount(boolean $per_customer_usage_count) Return the first ChildOrderCoupon filtered by the per_customer_usage_count column
|
||||
* @method ChildOrderCoupon findOneByUsageCanceled(boolean $usage_canceled) Return the first ChildOrderCoupon filtered by the usage_canceled column
|
||||
* @method ChildOrderCoupon findOneByCreatedAt(string $created_at) Return the first ChildOrderCoupon filtered by the created_at column
|
||||
* @method ChildOrderCoupon findOneByUpdatedAt(string $updated_at) Return the first ChildOrderCoupon filtered by the updated_at column
|
||||
*
|
||||
@@ -109,6 +112,7 @@ use Thelia\Model\Map\OrderCouponTableMap;
|
||||
* @method array findByIsAvailableOnSpecialOffers(boolean $is_available_on_special_offers) Return ChildOrderCoupon objects filtered by the is_available_on_special_offers column
|
||||
* @method array findBySerializedConditions(string $serialized_conditions) Return ChildOrderCoupon objects filtered by the serialized_conditions column
|
||||
* @method array findByPerCustomerUsageCount(boolean $per_customer_usage_count) Return ChildOrderCoupon objects filtered by the per_customer_usage_count column
|
||||
* @method array findByUsageCanceled(boolean $usage_canceled) Return ChildOrderCoupon objects filtered by the usage_canceled column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildOrderCoupon objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildOrderCoupon objects filtered by the updated_at column
|
||||
*
|
||||
@@ -199,7 +203,7 @@ abstract class OrderCouponQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `ORDER_ID`, `CODE`, `TYPE`, `AMOUNT`, `TITLE`, `SHORT_DESCRIPTION`, `DESCRIPTION`, `START_DATE`, `EXPIRATION_DATE`, `IS_CUMULATIVE`, `IS_REMOVING_POSTAGE`, `IS_AVAILABLE_ON_SPECIAL_OFFERS`, `SERIALIZED_CONDITIONS`, `PER_CUSTOMER_USAGE_COUNT`, `CREATED_AT`, `UPDATED_AT` FROM `order_coupon` WHERE `ID` = :p0';
|
||||
$sql = 'SELECT `ID`, `ORDER_ID`, `CODE`, `TYPE`, `AMOUNT`, `TITLE`, `SHORT_DESCRIPTION`, `DESCRIPTION`, `START_DATE`, `EXPIRATION_DATE`, `IS_CUMULATIVE`, `IS_REMOVING_POSTAGE`, `IS_AVAILABLE_ON_SPECIAL_OFFERS`, `SERIALIZED_CONDITIONS`, `PER_CUSTOMER_USAGE_COUNT`, `USAGE_CANCELED`, `CREATED_AT`, `UPDATED_AT` FROM `order_coupon` WHERE `ID` = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -781,6 +785,33 @@ abstract class OrderCouponQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(OrderCouponTableMap::PER_CUSTOMER_USAGE_COUNT, $perCustomerUsageCount, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the usage_canceled column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByUsageCanceled(true); // WHERE usage_canceled = true
|
||||
* $query->filterByUsageCanceled('yes'); // WHERE usage_canceled = true
|
||||
* </code>
|
||||
*
|
||||
* @param boolean|string $usageCanceled The value to use as filter.
|
||||
* Non-boolean arguments are converted using the following rules:
|
||||
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
|
||||
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
|
||||
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildOrderCouponQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByUsageCanceled($usageCanceled = null, $comparison = null)
|
||||
{
|
||||
if (is_string($usageCanceled)) {
|
||||
$usage_canceled = in_array(strtolower($usageCanceled), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderCouponTableMap::USAGE_CANCELED, $usageCanceled, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
|
||||
@@ -71,6 +71,25 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
*/
|
||||
protected $code;
|
||||
|
||||
/**
|
||||
* The value for the color field.
|
||||
* @var string
|
||||
*/
|
||||
protected $color;
|
||||
|
||||
/**
|
||||
* The value for the position field.
|
||||
* @var int
|
||||
*/
|
||||
protected $position;
|
||||
|
||||
/**
|
||||
* The value for the protected_status field.
|
||||
* Note: this column has a database default value of: false
|
||||
* @var boolean
|
||||
*/
|
||||
protected $protected_status;
|
||||
|
||||
/**
|
||||
* The value for the created_at field.
|
||||
* @var string
|
||||
@@ -129,11 +148,24 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
*/
|
||||
protected $orderStatusI18nsScheduledForDeletion = null;
|
||||
|
||||
/**
|
||||
* Applies default values to this object.
|
||||
* This method should be called from the object's constructor (or
|
||||
* equivalent initialization method).
|
||||
* @see __construct()
|
||||
*/
|
||||
public function applyDefaultValues()
|
||||
{
|
||||
$this->protected_status = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes internal state of Thelia\Model\Base\OrderStatus object.
|
||||
* @see applyDefaults()
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->applyDefaultValues();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -409,6 +441,39 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
return $this->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [color] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getColor()
|
||||
{
|
||||
|
||||
return $this->color;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [position] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getPosition()
|
||||
{
|
||||
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [protected_status] column value.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getProtectedStatus()
|
||||
{
|
||||
|
||||
return $this->protected_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [created_at] column value.
|
||||
*
|
||||
@@ -491,6 +556,77 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setCode()
|
||||
|
||||
/**
|
||||
* Set the value of [color] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\OrderStatus The current object (for fluent API support)
|
||||
*/
|
||||
public function setColor($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->color !== $v) {
|
||||
$this->color = $v;
|
||||
$this->modifiedColumns[OrderStatusTableMap::COLOR] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setColor()
|
||||
|
||||
/**
|
||||
* Set the value of [position] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\OrderStatus The current object (for fluent API support)
|
||||
*/
|
||||
public function setPosition($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->position !== $v) {
|
||||
$this->position = $v;
|
||||
$this->modifiedColumns[OrderStatusTableMap::POSITION] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setPosition()
|
||||
|
||||
/**
|
||||
* Sets the value of the [protected_status] column.
|
||||
* Non-boolean arguments are converted using the following rules:
|
||||
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
|
||||
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
|
||||
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
|
||||
*
|
||||
* @param boolean|integer|string $v The new value
|
||||
* @return \Thelia\Model\OrderStatus The current object (for fluent API support)
|
||||
*/
|
||||
public function setProtectedStatus($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
if (is_string($v)) {
|
||||
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
|
||||
} else {
|
||||
$v = (boolean) $v;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->protected_status !== $v) {
|
||||
$this->protected_status = $v;
|
||||
$this->modifiedColumns[OrderStatusTableMap::PROTECTED_STATUS] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setProtectedStatus()
|
||||
|
||||
/**
|
||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||
*
|
||||
@@ -543,6 +679,10 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
*/
|
||||
public function hasOnlyDefaultValues()
|
||||
{
|
||||
if ($this->protected_status !== false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// otherwise, everything was equal, so return TRUE
|
||||
return true;
|
||||
} // hasOnlyDefaultValues()
|
||||
@@ -576,13 +716,22 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : OrderStatusTableMap::translateFieldName('Code', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->code = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : OrderStatusTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : OrderStatusTableMap::translateFieldName('Color', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->color = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : OrderStatusTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->position = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : OrderStatusTableMap::translateFieldName('ProtectedStatus', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->protected_status = (null !== $col) ? (boolean) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : OrderStatusTableMap::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 ? 3 + $startcol : OrderStatusTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : OrderStatusTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
@@ -595,7 +744,7 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 4; // 4 = OrderStatusTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 7; // 7 = OrderStatusTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\OrderStatus object", 0, $e);
|
||||
@@ -859,6 +1008,15 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(OrderStatusTableMap::CODE)) {
|
||||
$modifiedColumns[':p' . $index++] = '`CODE`';
|
||||
}
|
||||
if ($this->isColumnModified(OrderStatusTableMap::COLOR)) {
|
||||
$modifiedColumns[':p' . $index++] = '`COLOR`';
|
||||
}
|
||||
if ($this->isColumnModified(OrderStatusTableMap::POSITION)) {
|
||||
$modifiedColumns[':p' . $index++] = '`POSITION`';
|
||||
}
|
||||
if ($this->isColumnModified(OrderStatusTableMap::PROTECTED_STATUS)) {
|
||||
$modifiedColumns[':p' . $index++] = '`PROTECTED_STATUS`';
|
||||
}
|
||||
if ($this->isColumnModified(OrderStatusTableMap::CREATED_AT)) {
|
||||
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
|
||||
}
|
||||
@@ -882,6 +1040,15 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
case '`CODE`':
|
||||
$stmt->bindValue($identifier, $this->code, PDO::PARAM_STR);
|
||||
break;
|
||||
case '`COLOR`':
|
||||
$stmt->bindValue($identifier, $this->color, PDO::PARAM_STR);
|
||||
break;
|
||||
case '`POSITION`':
|
||||
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
|
||||
break;
|
||||
case '`PROTECTED_STATUS`':
|
||||
$stmt->bindValue($identifier, (int) $this->protected_status, PDO::PARAM_INT);
|
||||
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;
|
||||
@@ -957,9 +1124,18 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
return $this->getCode();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getCreatedAt();
|
||||
return $this->getColor();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getPosition();
|
||||
break;
|
||||
case 4:
|
||||
return $this->getProtectedStatus();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
default:
|
||||
@@ -993,8 +1169,11 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
$result = array(
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getCode(),
|
||||
$keys[2] => $this->getCreatedAt(),
|
||||
$keys[3] => $this->getUpdatedAt(),
|
||||
$keys[2] => $this->getColor(),
|
||||
$keys[3] => $this->getPosition(),
|
||||
$keys[4] => $this->getProtectedStatus(),
|
||||
$keys[5] => $this->getCreatedAt(),
|
||||
$keys[6] => $this->getUpdatedAt(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||
@@ -1049,9 +1228,18 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
$this->setCode($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setCreatedAt($value);
|
||||
$this->setColor($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setPosition($value);
|
||||
break;
|
||||
case 4:
|
||||
$this->setProtectedStatus($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1080,8 +1268,11 @@ abstract class OrderStatus 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->setCreatedAt($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setUpdatedAt($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setColor($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setPosition($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setProtectedStatus($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]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1095,6 +1286,9 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
|
||||
if ($this->isColumnModified(OrderStatusTableMap::ID)) $criteria->add(OrderStatusTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(OrderStatusTableMap::CODE)) $criteria->add(OrderStatusTableMap::CODE, $this->code);
|
||||
if ($this->isColumnModified(OrderStatusTableMap::COLOR)) $criteria->add(OrderStatusTableMap::COLOR, $this->color);
|
||||
if ($this->isColumnModified(OrderStatusTableMap::POSITION)) $criteria->add(OrderStatusTableMap::POSITION, $this->position);
|
||||
if ($this->isColumnModified(OrderStatusTableMap::PROTECTED_STATUS)) $criteria->add(OrderStatusTableMap::PROTECTED_STATUS, $this->protected_status);
|
||||
if ($this->isColumnModified(OrderStatusTableMap::CREATED_AT)) $criteria->add(OrderStatusTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(OrderStatusTableMap::UPDATED_AT)) $criteria->add(OrderStatusTableMap::UPDATED_AT, $this->updated_at);
|
||||
|
||||
@@ -1161,6 +1355,9 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
|
||||
{
|
||||
$copyObj->setCode($this->getCode());
|
||||
$copyObj->setColor($this->getColor());
|
||||
$copyObj->setPosition($this->getPosition());
|
||||
$copyObj->setProtectedStatus($this->getProtectedStatus());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
|
||||
@@ -1855,10 +2052,14 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
{
|
||||
$this->id = null;
|
||||
$this->code = null;
|
||||
$this->color = null;
|
||||
$this->position = null;
|
||||
$this->protected_status = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->clearAllReferences();
|
||||
$this->applyDefaultValues();
|
||||
$this->resetModified();
|
||||
$this->setNew(true);
|
||||
$this->setDeleted(false);
|
||||
|
||||
@@ -24,11 +24,17 @@ use Thelia\Model\Map\OrderStatusTableMap;
|
||||
*
|
||||
* @method ChildOrderStatusQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildOrderStatusQuery orderByCode($order = Criteria::ASC) Order by the code column
|
||||
* @method ChildOrderStatusQuery orderByColor($order = Criteria::ASC) Order by the color column
|
||||
* @method ChildOrderStatusQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildOrderStatusQuery orderByProtectedStatus($order = Criteria::ASC) Order by the protected_status column
|
||||
* @method ChildOrderStatusQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildOrderStatusQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
* @method ChildOrderStatusQuery groupById() Group by the id column
|
||||
* @method ChildOrderStatusQuery groupByCode() Group by the code column
|
||||
* @method ChildOrderStatusQuery groupByColor() Group by the color column
|
||||
* @method ChildOrderStatusQuery groupByPosition() Group by the position column
|
||||
* @method ChildOrderStatusQuery groupByProtectedStatus() Group by the protected_status column
|
||||
* @method ChildOrderStatusQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildOrderStatusQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
@@ -49,11 +55,17 @@ use Thelia\Model\Map\OrderStatusTableMap;
|
||||
*
|
||||
* @method ChildOrderStatus findOneById(int $id) Return the first ChildOrderStatus filtered by the id column
|
||||
* @method ChildOrderStatus findOneByCode(string $code) Return the first ChildOrderStatus filtered by the code column
|
||||
* @method ChildOrderStatus findOneByColor(string $color) Return the first ChildOrderStatus filtered by the color column
|
||||
* @method ChildOrderStatus findOneByPosition(int $position) Return the first ChildOrderStatus filtered by the position column
|
||||
* @method ChildOrderStatus findOneByProtectedStatus(boolean $protected_status) Return the first ChildOrderStatus filtered by the protected_status column
|
||||
* @method ChildOrderStatus findOneByCreatedAt(string $created_at) Return the first ChildOrderStatus filtered by the created_at column
|
||||
* @method ChildOrderStatus findOneByUpdatedAt(string $updated_at) Return the first ChildOrderStatus filtered by the updated_at column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildOrderStatus objects filtered by the id column
|
||||
* @method array findByCode(string $code) Return ChildOrderStatus objects filtered by the code column
|
||||
* @method array findByColor(string $color) Return ChildOrderStatus objects filtered by the color column
|
||||
* @method array findByPosition(int $position) Return ChildOrderStatus objects filtered by the position column
|
||||
* @method array findByProtectedStatus(boolean $protected_status) Return ChildOrderStatus objects filtered by the protected_status column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildOrderStatus objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildOrderStatus objects filtered by the updated_at column
|
||||
*
|
||||
@@ -144,7 +156,7 @@ abstract class OrderStatusQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `CODE`, `CREATED_AT`, `UPDATED_AT` FROM `order_status` WHERE `ID` = :p0';
|
||||
$sql = 'SELECT `ID`, `CODE`, `COLOR`, `POSITION`, `PROTECTED_STATUS`, `CREATED_AT`, `UPDATED_AT` FROM `order_status` WHERE `ID` = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -303,6 +315,103 @@ abstract class OrderStatusQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(OrderStatusTableMap::CODE, $code, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the color column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByColor('fooValue'); // WHERE color = 'fooValue'
|
||||
* $query->filterByColor('%fooValue%'); // WHERE color LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $color 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 ChildOrderStatusQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByColor($color = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($color)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $color)) {
|
||||
$color = str_replace('*', '%', $color);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderStatusTableMap::COLOR, $color, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the position column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByPosition(1234); // WHERE position = 1234
|
||||
* $query->filterByPosition(array(12, 34)); // WHERE position IN (12, 34)
|
||||
* $query->filterByPosition(array('min' => 12)); // WHERE position > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $position 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 ChildOrderStatusQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPosition($position = null, $comparison = null)
|
||||
{
|
||||
if (is_array($position)) {
|
||||
$useMinMax = false;
|
||||
if (isset($position['min'])) {
|
||||
$this->addUsingAlias(OrderStatusTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($position['max'])) {
|
||||
$this->addUsingAlias(OrderStatusTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderStatusTableMap::POSITION, $position, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the protected_status column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByProtectedStatus(true); // WHERE protected_status = true
|
||||
* $query->filterByProtectedStatus('yes'); // WHERE protected_status = true
|
||||
* </code>
|
||||
*
|
||||
* @param boolean|string $protectedStatus The value to use as filter.
|
||||
* Non-boolean arguments are converted using the following rules:
|
||||
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
|
||||
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
|
||||
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildOrderStatusQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByProtectedStatus($protectedStatus = null, $comparison = null)
|
||||
{
|
||||
if (is_string($protectedStatus)) {
|
||||
$protected_status = in_array(strtolower($protectedStatus), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderStatusTableMap::PROTECTED_STATUS, $protectedStatus, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user