Merge branch 'master' of https://github.com/thelia/thelia into coupon
# By Manuel Raynaud (18) and others # Via franck (9) and others * 'master' of https://github.com/thelia/thelia: (39 commits) Working : Working : Working : Working : Fixed minor visual glitches Working : Resize countries flag + Add bootstrap-switch fix test suite clear asset cache in cache:cler command Added a 'development mode' to assetic smarty plugin rewriting router use good Request object Added Tools\URL test case, and a test case superclass for initializing Tools\URL remove unused UrlWritin controller create router for rewriting matching customer substitutions fix typo in front id Working : For attributes on labels Working : For attributes on labels add label_attr attribute to form smarty plugin start refactorin rewriting routing ... Conflicts: core/lib/Thelia/Config/Resources/routing/front.xml templates/admin/default/assets/less/thelia/bootstrap-editable.less templates/admin/default/categories.html
This commit is contained in:
@@ -85,10 +85,40 @@ abstract class Lang implements ActiveRecordInterface
|
||||
protected $url;
|
||||
|
||||
/**
|
||||
* The value for the position field.
|
||||
* @var int
|
||||
* The value for the date_format field.
|
||||
* @var string
|
||||
*/
|
||||
protected $position;
|
||||
protected $date_format;
|
||||
|
||||
/**
|
||||
* The value for the time_format field.
|
||||
* @var string
|
||||
*/
|
||||
protected $time_format;
|
||||
|
||||
/**
|
||||
* The value for the datetime_format field.
|
||||
* @var string
|
||||
*/
|
||||
protected $datetime_format;
|
||||
|
||||
/**
|
||||
* The value for the decimal_separator field.
|
||||
* @var string
|
||||
*/
|
||||
protected $decimal_separator;
|
||||
|
||||
/**
|
||||
* The value for the thousands_separator field.
|
||||
* @var string
|
||||
*/
|
||||
protected $thousands_separator;
|
||||
|
||||
/**
|
||||
* The value for the decimals field.
|
||||
* @var string
|
||||
*/
|
||||
protected $decimals;
|
||||
|
||||
/**
|
||||
* The value for the by_default field.
|
||||
@@ -96,6 +126,12 @@ abstract class Lang implements ActiveRecordInterface
|
||||
*/
|
||||
protected $by_default;
|
||||
|
||||
/**
|
||||
* The value for the position field.
|
||||
* @var int
|
||||
*/
|
||||
protected $position;
|
||||
|
||||
/**
|
||||
* The value for the created_at field.
|
||||
* @var string
|
||||
@@ -426,14 +462,69 @@ abstract class Lang implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [position] column value.
|
||||
* Get the [date_format] column value.
|
||||
*
|
||||
* @return int
|
||||
* @return string
|
||||
*/
|
||||
public function getPosition()
|
||||
public function getDateFormat()
|
||||
{
|
||||
|
||||
return $this->position;
|
||||
return $this->date_format;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [time_format] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTimeFormat()
|
||||
{
|
||||
|
||||
return $this->time_format;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [datetime_format] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDatetimeFormat()
|
||||
{
|
||||
|
||||
return $this->datetime_format;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [decimal_separator] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDecimalSeparator()
|
||||
{
|
||||
|
||||
return $this->decimal_separator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [thousands_separator] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getThousandsSeparator()
|
||||
{
|
||||
|
||||
return $this->thousands_separator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [decimals] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDecimals()
|
||||
{
|
||||
|
||||
return $this->decimals;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -447,6 +538,17 @@ abstract class Lang implements ActiveRecordInterface
|
||||
return $this->by_default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [position] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getPosition()
|
||||
{
|
||||
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [created_at] column value.
|
||||
*
|
||||
@@ -593,25 +695,130 @@ abstract class Lang implements ActiveRecordInterface
|
||||
} // setUrl()
|
||||
|
||||
/**
|
||||
* Set the value of [position] column.
|
||||
* Set the value of [date_format] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Lang The current object (for fluent API support)
|
||||
*/
|
||||
public function setPosition($v)
|
||||
public function setDateFormat($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->position !== $v) {
|
||||
$this->position = $v;
|
||||
$this->modifiedColumns[] = LangTableMap::POSITION;
|
||||
if ($this->date_format !== $v) {
|
||||
$this->date_format = $v;
|
||||
$this->modifiedColumns[] = LangTableMap::DATE_FORMAT;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setPosition()
|
||||
} // setDateFormat()
|
||||
|
||||
/**
|
||||
* Set the value of [time_format] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Lang The current object (for fluent API support)
|
||||
*/
|
||||
public function setTimeFormat($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->time_format !== $v) {
|
||||
$this->time_format = $v;
|
||||
$this->modifiedColumns[] = LangTableMap::TIME_FORMAT;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setTimeFormat()
|
||||
|
||||
/**
|
||||
* Set the value of [datetime_format] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Lang The current object (for fluent API support)
|
||||
*/
|
||||
public function setDatetimeFormat($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->datetime_format !== $v) {
|
||||
$this->datetime_format = $v;
|
||||
$this->modifiedColumns[] = LangTableMap::DATETIME_FORMAT;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setDatetimeFormat()
|
||||
|
||||
/**
|
||||
* Set the value of [decimal_separator] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Lang The current object (for fluent API support)
|
||||
*/
|
||||
public function setDecimalSeparator($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->decimal_separator !== $v) {
|
||||
$this->decimal_separator = $v;
|
||||
$this->modifiedColumns[] = LangTableMap::DECIMAL_SEPARATOR;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setDecimalSeparator()
|
||||
|
||||
/**
|
||||
* Set the value of [thousands_separator] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Lang The current object (for fluent API support)
|
||||
*/
|
||||
public function setThousandsSeparator($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->thousands_separator !== $v) {
|
||||
$this->thousands_separator = $v;
|
||||
$this->modifiedColumns[] = LangTableMap::THOUSANDS_SEPARATOR;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setThousandsSeparator()
|
||||
|
||||
/**
|
||||
* Set the value of [decimals] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Lang The current object (for fluent API support)
|
||||
*/
|
||||
public function setDecimals($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->decimals !== $v) {
|
||||
$this->decimals = $v;
|
||||
$this->modifiedColumns[] = LangTableMap::DECIMALS;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setDecimals()
|
||||
|
||||
/**
|
||||
* Set the value of [by_default] column.
|
||||
@@ -634,6 +841,27 @@ abstract class Lang implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setByDefault()
|
||||
|
||||
/**
|
||||
* Set the value of [position] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\Lang 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[] = LangTableMap::POSITION;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setPosition()
|
||||
|
||||
/**
|
||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||
*
|
||||
@@ -728,19 +956,37 @@ abstract class Lang implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : LangTableMap::translateFieldName('Url', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->url = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : LangTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->position = (null !== $col) ? (int) $col : null;
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : LangTableMap::translateFieldName('DateFormat', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->date_format = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : LangTableMap::translateFieldName('ByDefault', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : LangTableMap::translateFieldName('TimeFormat', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->time_format = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : LangTableMap::translateFieldName('DatetimeFormat', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->datetime_format = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : LangTableMap::translateFieldName('DecimalSeparator', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->decimal_separator = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : LangTableMap::translateFieldName('ThousandsSeparator', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->thousands_separator = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : LangTableMap::translateFieldName('Decimals', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->decimals = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : LangTableMap::translateFieldName('ByDefault', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->by_default = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : LangTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : LangTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->position = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : LangTableMap::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 ? 8 + $startcol : LangTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : LangTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
@@ -753,7 +999,7 @@ abstract class Lang implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 9; // 9 = LangTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 15; // 15 = LangTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\Lang object", 0, $e);
|
||||
@@ -988,12 +1234,30 @@ abstract class Lang implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(LangTableMap::URL)) {
|
||||
$modifiedColumns[':p' . $index++] = 'URL';
|
||||
}
|
||||
if ($this->isColumnModified(LangTableMap::POSITION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'POSITION';
|
||||
if ($this->isColumnModified(LangTableMap::DATE_FORMAT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'DATE_FORMAT';
|
||||
}
|
||||
if ($this->isColumnModified(LangTableMap::TIME_FORMAT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'TIME_FORMAT';
|
||||
}
|
||||
if ($this->isColumnModified(LangTableMap::DATETIME_FORMAT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'DATETIME_FORMAT';
|
||||
}
|
||||
if ($this->isColumnModified(LangTableMap::DECIMAL_SEPARATOR)) {
|
||||
$modifiedColumns[':p' . $index++] = 'DECIMAL_SEPARATOR';
|
||||
}
|
||||
if ($this->isColumnModified(LangTableMap::THOUSANDS_SEPARATOR)) {
|
||||
$modifiedColumns[':p' . $index++] = 'THOUSANDS_SEPARATOR';
|
||||
}
|
||||
if ($this->isColumnModified(LangTableMap::DECIMALS)) {
|
||||
$modifiedColumns[':p' . $index++] = 'DECIMALS';
|
||||
}
|
||||
if ($this->isColumnModified(LangTableMap::BY_DEFAULT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'BY_DEFAULT';
|
||||
}
|
||||
if ($this->isColumnModified(LangTableMap::POSITION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'POSITION';
|
||||
}
|
||||
if ($this->isColumnModified(LangTableMap::CREATED_AT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
|
||||
}
|
||||
@@ -1026,12 +1290,30 @@ abstract class Lang implements ActiveRecordInterface
|
||||
case 'URL':
|
||||
$stmt->bindValue($identifier, $this->url, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'POSITION':
|
||||
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
|
||||
case 'DATE_FORMAT':
|
||||
$stmt->bindValue($identifier, $this->date_format, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'TIME_FORMAT':
|
||||
$stmt->bindValue($identifier, $this->time_format, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'DATETIME_FORMAT':
|
||||
$stmt->bindValue($identifier, $this->datetime_format, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'DECIMAL_SEPARATOR':
|
||||
$stmt->bindValue($identifier, $this->decimal_separator, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'THOUSANDS_SEPARATOR':
|
||||
$stmt->bindValue($identifier, $this->thousands_separator, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'DECIMALS':
|
||||
$stmt->bindValue($identifier, $this->decimals, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'BY_DEFAULT':
|
||||
$stmt->bindValue($identifier, $this->by_default, PDO::PARAM_INT);
|
||||
break;
|
||||
case 'POSITION':
|
||||
$stmt->bindValue($identifier, $this->position, 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;
|
||||
@@ -1116,15 +1398,33 @@ abstract class Lang implements ActiveRecordInterface
|
||||
return $this->getUrl();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getPosition();
|
||||
return $this->getDateFormat();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getByDefault();
|
||||
return $this->getTimeFormat();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getCreatedAt();
|
||||
return $this->getDatetimeFormat();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getDecimalSeparator();
|
||||
break;
|
||||
case 9:
|
||||
return $this->getThousandsSeparator();
|
||||
break;
|
||||
case 10:
|
||||
return $this->getDecimals();
|
||||
break;
|
||||
case 11:
|
||||
return $this->getByDefault();
|
||||
break;
|
||||
case 12:
|
||||
return $this->getPosition();
|
||||
break;
|
||||
case 13:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 14:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
default:
|
||||
@@ -1160,10 +1460,16 @@ abstract class Lang implements ActiveRecordInterface
|
||||
$keys[2] => $this->getCode(),
|
||||
$keys[3] => $this->getLocale(),
|
||||
$keys[4] => $this->getUrl(),
|
||||
$keys[5] => $this->getPosition(),
|
||||
$keys[6] => $this->getByDefault(),
|
||||
$keys[7] => $this->getCreatedAt(),
|
||||
$keys[8] => $this->getUpdatedAt(),
|
||||
$keys[5] => $this->getDateFormat(),
|
||||
$keys[6] => $this->getTimeFormat(),
|
||||
$keys[7] => $this->getDatetimeFormat(),
|
||||
$keys[8] => $this->getDecimalSeparator(),
|
||||
$keys[9] => $this->getThousandsSeparator(),
|
||||
$keys[10] => $this->getDecimals(),
|
||||
$keys[11] => $this->getByDefault(),
|
||||
$keys[12] => $this->getPosition(),
|
||||
$keys[13] => $this->getCreatedAt(),
|
||||
$keys[14] => $this->getUpdatedAt(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1220,15 +1526,33 @@ abstract class Lang implements ActiveRecordInterface
|
||||
$this->setUrl($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setPosition($value);
|
||||
$this->setDateFormat($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setByDefault($value);
|
||||
$this->setTimeFormat($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setCreatedAt($value);
|
||||
$this->setDatetimeFormat($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setDecimalSeparator($value);
|
||||
break;
|
||||
case 9:
|
||||
$this->setThousandsSeparator($value);
|
||||
break;
|
||||
case 10:
|
||||
$this->setDecimals($value);
|
||||
break;
|
||||
case 11:
|
||||
$this->setByDefault($value);
|
||||
break;
|
||||
case 12:
|
||||
$this->setPosition($value);
|
||||
break;
|
||||
case 13:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 14:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1260,10 +1584,16 @@ abstract class Lang implements ActiveRecordInterface
|
||||
if (array_key_exists($keys[2], $arr)) $this->setCode($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setLocale($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setUrl($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setPosition($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setByDefault($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setCreatedAt($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setUpdatedAt($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setDateFormat($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setTimeFormat($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setDatetimeFormat($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setDecimalSeparator($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setThousandsSeparator($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[10], $arr)) $this->setDecimals($arr[$keys[10]]);
|
||||
if (array_key_exists($keys[11], $arr)) $this->setByDefault($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[12], $arr)) $this->setPosition($arr[$keys[12]]);
|
||||
if (array_key_exists($keys[13], $arr)) $this->setCreatedAt($arr[$keys[13]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setUpdatedAt($arr[$keys[14]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1280,8 +1610,14 @@ abstract class Lang implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(LangTableMap::CODE)) $criteria->add(LangTableMap::CODE, $this->code);
|
||||
if ($this->isColumnModified(LangTableMap::LOCALE)) $criteria->add(LangTableMap::LOCALE, $this->locale);
|
||||
if ($this->isColumnModified(LangTableMap::URL)) $criteria->add(LangTableMap::URL, $this->url);
|
||||
if ($this->isColumnModified(LangTableMap::POSITION)) $criteria->add(LangTableMap::POSITION, $this->position);
|
||||
if ($this->isColumnModified(LangTableMap::DATE_FORMAT)) $criteria->add(LangTableMap::DATE_FORMAT, $this->date_format);
|
||||
if ($this->isColumnModified(LangTableMap::TIME_FORMAT)) $criteria->add(LangTableMap::TIME_FORMAT, $this->time_format);
|
||||
if ($this->isColumnModified(LangTableMap::DATETIME_FORMAT)) $criteria->add(LangTableMap::DATETIME_FORMAT, $this->datetime_format);
|
||||
if ($this->isColumnModified(LangTableMap::DECIMAL_SEPARATOR)) $criteria->add(LangTableMap::DECIMAL_SEPARATOR, $this->decimal_separator);
|
||||
if ($this->isColumnModified(LangTableMap::THOUSANDS_SEPARATOR)) $criteria->add(LangTableMap::THOUSANDS_SEPARATOR, $this->thousands_separator);
|
||||
if ($this->isColumnModified(LangTableMap::DECIMALS)) $criteria->add(LangTableMap::DECIMALS, $this->decimals);
|
||||
if ($this->isColumnModified(LangTableMap::BY_DEFAULT)) $criteria->add(LangTableMap::BY_DEFAULT, $this->by_default);
|
||||
if ($this->isColumnModified(LangTableMap::POSITION)) $criteria->add(LangTableMap::POSITION, $this->position);
|
||||
if ($this->isColumnModified(LangTableMap::CREATED_AT)) $criteria->add(LangTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(LangTableMap::UPDATED_AT)) $criteria->add(LangTableMap::UPDATED_AT, $this->updated_at);
|
||||
|
||||
@@ -1351,8 +1687,14 @@ abstract class Lang implements ActiveRecordInterface
|
||||
$copyObj->setCode($this->getCode());
|
||||
$copyObj->setLocale($this->getLocale());
|
||||
$copyObj->setUrl($this->getUrl());
|
||||
$copyObj->setPosition($this->getPosition());
|
||||
$copyObj->setDateFormat($this->getDateFormat());
|
||||
$copyObj->setTimeFormat($this->getTimeFormat());
|
||||
$copyObj->setDatetimeFormat($this->getDatetimeFormat());
|
||||
$copyObj->setDecimalSeparator($this->getDecimalSeparator());
|
||||
$copyObj->setThousandsSeparator($this->getThousandsSeparator());
|
||||
$copyObj->setDecimals($this->getDecimals());
|
||||
$copyObj->setByDefault($this->getByDefault());
|
||||
$copyObj->setPosition($this->getPosition());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
if ($makeNew) {
|
||||
@@ -1393,8 +1735,14 @@ abstract class Lang implements ActiveRecordInterface
|
||||
$this->code = null;
|
||||
$this->locale = null;
|
||||
$this->url = null;
|
||||
$this->position = null;
|
||||
$this->date_format = null;
|
||||
$this->time_format = null;
|
||||
$this->datetime_format = null;
|
||||
$this->decimal_separator = null;
|
||||
$this->thousands_separator = null;
|
||||
$this->decimals = null;
|
||||
$this->by_default = null;
|
||||
$this->position = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
$this->alreadyInSave = false;
|
||||
|
||||
@@ -23,8 +23,14 @@ use Thelia\Model\Map\LangTableMap;
|
||||
* @method ChildLangQuery orderByCode($order = Criteria::ASC) Order by the code column
|
||||
* @method ChildLangQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
||||
* @method ChildLangQuery orderByUrl($order = Criteria::ASC) Order by the url column
|
||||
* @method ChildLangQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildLangQuery orderByDateFormat($order = Criteria::ASC) Order by the date_format column
|
||||
* @method ChildLangQuery orderByTimeFormat($order = Criteria::ASC) Order by the time_format column
|
||||
* @method ChildLangQuery orderByDatetimeFormat($order = Criteria::ASC) Order by the datetime_format column
|
||||
* @method ChildLangQuery orderByDecimalSeparator($order = Criteria::ASC) Order by the decimal_separator column
|
||||
* @method ChildLangQuery orderByThousandsSeparator($order = Criteria::ASC) Order by the thousands_separator column
|
||||
* @method ChildLangQuery orderByDecimals($order = Criteria::ASC) Order by the decimals column
|
||||
* @method ChildLangQuery orderByByDefault($order = Criteria::ASC) Order by the by_default column
|
||||
* @method ChildLangQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildLangQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildLangQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
@@ -33,8 +39,14 @@ use Thelia\Model\Map\LangTableMap;
|
||||
* @method ChildLangQuery groupByCode() Group by the code column
|
||||
* @method ChildLangQuery groupByLocale() Group by the locale column
|
||||
* @method ChildLangQuery groupByUrl() Group by the url column
|
||||
* @method ChildLangQuery groupByPosition() Group by the position column
|
||||
* @method ChildLangQuery groupByDateFormat() Group by the date_format column
|
||||
* @method ChildLangQuery groupByTimeFormat() Group by the time_format column
|
||||
* @method ChildLangQuery groupByDatetimeFormat() Group by the datetime_format column
|
||||
* @method ChildLangQuery groupByDecimalSeparator() Group by the decimal_separator column
|
||||
* @method ChildLangQuery groupByThousandsSeparator() Group by the thousands_separator column
|
||||
* @method ChildLangQuery groupByDecimals() Group by the decimals column
|
||||
* @method ChildLangQuery groupByByDefault() Group by the by_default column
|
||||
* @method ChildLangQuery groupByPosition() Group by the position column
|
||||
* @method ChildLangQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildLangQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
@@ -50,8 +62,14 @@ use Thelia\Model\Map\LangTableMap;
|
||||
* @method ChildLang findOneByCode(string $code) Return the first ChildLang filtered by the code column
|
||||
* @method ChildLang findOneByLocale(string $locale) Return the first ChildLang filtered by the locale column
|
||||
* @method ChildLang findOneByUrl(string $url) Return the first ChildLang filtered by the url column
|
||||
* @method ChildLang findOneByPosition(int $position) Return the first ChildLang filtered by the position column
|
||||
* @method ChildLang findOneByDateFormat(string $date_format) Return the first ChildLang filtered by the date_format column
|
||||
* @method ChildLang findOneByTimeFormat(string $time_format) Return the first ChildLang filtered by the time_format column
|
||||
* @method ChildLang findOneByDatetimeFormat(string $datetime_format) Return the first ChildLang filtered by the datetime_format column
|
||||
* @method ChildLang findOneByDecimalSeparator(string $decimal_separator) Return the first ChildLang filtered by the decimal_separator column
|
||||
* @method ChildLang findOneByThousandsSeparator(string $thousands_separator) Return the first ChildLang filtered by the thousands_separator column
|
||||
* @method ChildLang findOneByDecimals(string $decimals) Return the first ChildLang filtered by the decimals column
|
||||
* @method ChildLang findOneByByDefault(int $by_default) Return the first ChildLang filtered by the by_default column
|
||||
* @method ChildLang findOneByPosition(int $position) Return the first ChildLang filtered by the position column
|
||||
* @method ChildLang findOneByCreatedAt(string $created_at) Return the first ChildLang filtered by the created_at column
|
||||
* @method ChildLang findOneByUpdatedAt(string $updated_at) Return the first ChildLang filtered by the updated_at column
|
||||
*
|
||||
@@ -60,8 +78,14 @@ use Thelia\Model\Map\LangTableMap;
|
||||
* @method array findByCode(string $code) Return ChildLang objects filtered by the code column
|
||||
* @method array findByLocale(string $locale) Return ChildLang objects filtered by the locale column
|
||||
* @method array findByUrl(string $url) Return ChildLang objects filtered by the url column
|
||||
* @method array findByPosition(int $position) Return ChildLang objects filtered by the position column
|
||||
* @method array findByDateFormat(string $date_format) Return ChildLang objects filtered by the date_format column
|
||||
* @method array findByTimeFormat(string $time_format) Return ChildLang objects filtered by the time_format column
|
||||
* @method array findByDatetimeFormat(string $datetime_format) Return ChildLang objects filtered by the datetime_format column
|
||||
* @method array findByDecimalSeparator(string $decimal_separator) Return ChildLang objects filtered by the decimal_separator column
|
||||
* @method array findByThousandsSeparator(string $thousands_separator) Return ChildLang objects filtered by the thousands_separator column
|
||||
* @method array findByDecimals(string $decimals) Return ChildLang objects filtered by the decimals column
|
||||
* @method array findByByDefault(int $by_default) Return ChildLang objects filtered by the by_default column
|
||||
* @method array findByPosition(int $position) Return ChildLang objects filtered by the position column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildLang objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildLang objects filtered by the updated_at column
|
||||
*
|
||||
@@ -152,7 +176,7 @@ abstract class LangQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, TITLE, CODE, LOCALE, URL, POSITION, BY_DEFAULT, CREATED_AT, UPDATED_AT FROM lang WHERE ID = :p0';
|
||||
$sql = 'SELECT ID, TITLE, CODE, LOCALE, URL, DATE_FORMAT, TIME_FORMAT, DATETIME_FORMAT, DECIMAL_SEPARATOR, THOUSANDS_SEPARATOR, DECIMALS, BY_DEFAULT, POSITION, CREATED_AT, UPDATED_AT FROM lang WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -399,44 +423,177 @@ abstract class LangQuery extends ModelCriteria
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the position column
|
||||
* Filter the query on the date_format 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
|
||||
* $query->filterByDateFormat('fooValue'); // WHERE date_format = 'fooValue'
|
||||
* $query->filterByDateFormat('%fooValue%'); // WHERE date_format LIKE '%fooValue%'
|
||||
* </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 $dateFormat 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 ChildLangQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPosition($position = null, $comparison = null)
|
||||
public function filterByDateFormat($dateFormat = null, $comparison = null)
|
||||
{
|
||||
if (is_array($position)) {
|
||||
$useMinMax = false;
|
||||
if (isset($position['min'])) {
|
||||
$this->addUsingAlias(LangTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($position['max'])) {
|
||||
$this->addUsingAlias(LangTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
if (null === $comparison) {
|
||||
if (is_array($dateFormat)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dateFormat)) {
|
||||
$dateFormat = str_replace('*', '%', $dateFormat);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(LangTableMap::POSITION, $position, $comparison);
|
||||
return $this->addUsingAlias(LangTableMap::DATE_FORMAT, $dateFormat, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the time_format column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByTimeFormat('fooValue'); // WHERE time_format = 'fooValue'
|
||||
* $query->filterByTimeFormat('%fooValue%'); // WHERE time_format LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $timeFormat 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 ChildLangQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByTimeFormat($timeFormat = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($timeFormat)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $timeFormat)) {
|
||||
$timeFormat = str_replace('*', '%', $timeFormat);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(LangTableMap::TIME_FORMAT, $timeFormat, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the datetime_format column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDatetimeFormat('fooValue'); // WHERE datetime_format = 'fooValue'
|
||||
* $query->filterByDatetimeFormat('%fooValue%'); // WHERE datetime_format LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $datetimeFormat 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 ChildLangQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDatetimeFormat($datetimeFormat = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($datetimeFormat)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $datetimeFormat)) {
|
||||
$datetimeFormat = str_replace('*', '%', $datetimeFormat);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(LangTableMap::DATETIME_FORMAT, $datetimeFormat, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the decimal_separator column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDecimalSeparator('fooValue'); // WHERE decimal_separator = 'fooValue'
|
||||
* $query->filterByDecimalSeparator('%fooValue%'); // WHERE decimal_separator LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $decimalSeparator 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 ChildLangQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDecimalSeparator($decimalSeparator = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($decimalSeparator)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $decimalSeparator)) {
|
||||
$decimalSeparator = str_replace('*', '%', $decimalSeparator);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(LangTableMap::DECIMAL_SEPARATOR, $decimalSeparator, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the thousands_separator column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByThousandsSeparator('fooValue'); // WHERE thousands_separator = 'fooValue'
|
||||
* $query->filterByThousandsSeparator('%fooValue%'); // WHERE thousands_separator LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $thousandsSeparator 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 ChildLangQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByThousandsSeparator($thousandsSeparator = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($thousandsSeparator)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $thousandsSeparator)) {
|
||||
$thousandsSeparator = str_replace('*', '%', $thousandsSeparator);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(LangTableMap::THOUSANDS_SEPARATOR, $thousandsSeparator, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the decimals column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDecimals('fooValue'); // WHERE decimals = 'fooValue'
|
||||
* $query->filterByDecimals('%fooValue%'); // WHERE decimals LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $decimals 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 ChildLangQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDecimals($decimals = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($decimals)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $decimals)) {
|
||||
$decimals = str_replace('*', '%', $decimals);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(LangTableMap::DECIMALS, $decimals, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -480,6 +637,47 @@ abstract class LangQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(LangTableMap::BY_DEFAULT, $byDefault, $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 ChildLangQuery 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(LangTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($position['max'])) {
|
||||
$this->addUsingAlias(LangTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(LangTableMap::POSITION, $position, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user