Implemented mail messages templates and layouts

This commit is contained in:
Franck Allimant
2013-11-26 19:20:45 +01:00
committed by Manuel Raynaud
parent e675be4cff
commit 33e0a854f2
40 changed files with 2377 additions and 201 deletions

View File

@@ -78,6 +78,30 @@ abstract class Message implements ActiveRecordInterface
*/
protected $secured;
/**
* The value for the text_layout_file_name field.
* @var string
*/
protected $text_layout_file_name;
/**
* The value for the text_template_file_name field.
* @var string
*/
protected $text_template_file_name;
/**
* The value for the html_layout_file_name field.
* @var string
*/
protected $html_layout_file_name;
/**
* The value for the html_template_file_name field.
* @var string
*/
protected $html_template_file_name;
/**
* The value for the created_at field.
* @var string
@@ -467,6 +491,50 @@ abstract class Message implements ActiveRecordInterface
return $this->secured;
}
/**
* Get the [text_layout_file_name] column value.
*
* @return string
*/
public function getTextLayoutFileName()
{
return $this->text_layout_file_name;
}
/**
* Get the [text_template_file_name] column value.
*
* @return string
*/
public function getTextTemplateFileName()
{
return $this->text_template_file_name;
}
/**
* Get the [html_layout_file_name] column value.
*
* @return string
*/
public function getHtmlLayoutFileName()
{
return $this->html_layout_file_name;
}
/**
* Get the [html_template_file_name] column value.
*
* @return string
*/
public function getHtmlTemplateFileName()
{
return $this->html_template_file_name;
}
/**
* Get the [optionally formatted] temporal [created_at] column value.
*
@@ -612,6 +680,90 @@ abstract class Message implements ActiveRecordInterface
return $this;
} // setSecured()
/**
* Set the value of [text_layout_file_name] column.
*
* @param string $v new value
* @return \Thelia\Model\Message The current object (for fluent API support)
*/
public function setTextLayoutFileName($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->text_layout_file_name !== $v) {
$this->text_layout_file_name = $v;
$this->modifiedColumns[] = MessageTableMap::TEXT_LAYOUT_FILE_NAME;
}
return $this;
} // setTextLayoutFileName()
/**
* Set the value of [text_template_file_name] column.
*
* @param string $v new value
* @return \Thelia\Model\Message The current object (for fluent API support)
*/
public function setTextTemplateFileName($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->text_template_file_name !== $v) {
$this->text_template_file_name = $v;
$this->modifiedColumns[] = MessageTableMap::TEXT_TEMPLATE_FILE_NAME;
}
return $this;
} // setTextTemplateFileName()
/**
* Set the value of [html_layout_file_name] column.
*
* @param string $v new value
* @return \Thelia\Model\Message The current object (for fluent API support)
*/
public function setHtmlLayoutFileName($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->html_layout_file_name !== $v) {
$this->html_layout_file_name = $v;
$this->modifiedColumns[] = MessageTableMap::HTML_LAYOUT_FILE_NAME;
}
return $this;
} // setHtmlLayoutFileName()
/**
* Set the value of [html_template_file_name] column.
*
* @param string $v new value
* @return \Thelia\Model\Message The current object (for fluent API support)
*/
public function setHtmlTemplateFileName($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->html_template_file_name !== $v) {
$this->html_template_file_name = $v;
$this->modifiedColumns[] = MessageTableMap::HTML_TEMPLATE_FILE_NAME;
}
return $this;
} // setHtmlTemplateFileName()
/**
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
*
@@ -767,28 +919,40 @@ abstract class Message implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : MessageTableMap::translateFieldName('Secured', TableMap::TYPE_PHPNAME, $indexType)];
$this->secured = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageTableMap::translateFieldName('TextLayoutFileName', TableMap::TYPE_PHPNAME, $indexType)];
$this->text_layout_file_name = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageTableMap::translateFieldName('TextTemplateFileName', TableMap::TYPE_PHPNAME, $indexType)];
$this->text_template_file_name = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : MessageTableMap::translateFieldName('HtmlLayoutFileName', TableMap::TYPE_PHPNAME, $indexType)];
$this->html_layout_file_name = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : MessageTableMap::translateFieldName('HtmlTemplateFileName', TableMap::TYPE_PHPNAME, $indexType)];
$this->html_template_file_name = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : MessageTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : MessageTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : MessageTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : MessageTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
$this->version = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : MessageTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : MessageTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
$this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : MessageTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : MessageTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
$this->version_created_by = (null !== $col) ? (string) $col : null;
$this->resetModified();
@@ -798,7 +962,7 @@ abstract class Message implements ActiveRecordInterface
$this->ensureConsistency();
}
return $startcol + 8; // 8 = MessageTableMap::NUM_HYDRATE_COLUMNS.
return $startcol + 12; // 12 = MessageTableMap::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating \Thelia\Model\Message object", 0, $e);
@@ -1077,6 +1241,18 @@ abstract class Message implements ActiveRecordInterface
if ($this->isColumnModified(MessageTableMap::SECURED)) {
$modifiedColumns[':p' . $index++] = 'SECURED';
}
if ($this->isColumnModified(MessageTableMap::TEXT_LAYOUT_FILE_NAME)) {
$modifiedColumns[':p' . $index++] = 'TEXT_LAYOUT_FILE_NAME';
}
if ($this->isColumnModified(MessageTableMap::TEXT_TEMPLATE_FILE_NAME)) {
$modifiedColumns[':p' . $index++] = 'TEXT_TEMPLATE_FILE_NAME';
}
if ($this->isColumnModified(MessageTableMap::HTML_LAYOUT_FILE_NAME)) {
$modifiedColumns[':p' . $index++] = 'HTML_LAYOUT_FILE_NAME';
}
if ($this->isColumnModified(MessageTableMap::HTML_TEMPLATE_FILE_NAME)) {
$modifiedColumns[':p' . $index++] = 'HTML_TEMPLATE_FILE_NAME';
}
if ($this->isColumnModified(MessageTableMap::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
}
@@ -1112,6 +1288,18 @@ abstract class Message implements ActiveRecordInterface
case 'SECURED':
$stmt->bindValue($identifier, $this->secured, PDO::PARAM_INT);
break;
case 'TEXT_LAYOUT_FILE_NAME':
$stmt->bindValue($identifier, $this->text_layout_file_name, PDO::PARAM_STR);
break;
case 'TEXT_TEMPLATE_FILE_NAME':
$stmt->bindValue($identifier, $this->text_template_file_name, PDO::PARAM_STR);
break;
case 'HTML_LAYOUT_FILE_NAME':
$stmt->bindValue($identifier, $this->html_layout_file_name, PDO::PARAM_STR);
break;
case 'HTML_TEMPLATE_FILE_NAME':
$stmt->bindValue($identifier, $this->html_template_file_name, 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;
@@ -1199,18 +1387,30 @@ abstract class Message implements ActiveRecordInterface
return $this->getSecured();
break;
case 3:
return $this->getCreatedAt();
return $this->getTextLayoutFileName();
break;
case 4:
return $this->getUpdatedAt();
return $this->getTextTemplateFileName();
break;
case 5:
return $this->getVersion();
return $this->getHtmlLayoutFileName();
break;
case 6:
return $this->getVersionCreatedAt();
return $this->getHtmlTemplateFileName();
break;
case 7:
return $this->getCreatedAt();
break;
case 8:
return $this->getUpdatedAt();
break;
case 9:
return $this->getVersion();
break;
case 10:
return $this->getVersionCreatedAt();
break;
case 11:
return $this->getVersionCreatedBy();
break;
default:
@@ -1245,11 +1445,15 @@ abstract class Message implements ActiveRecordInterface
$keys[0] => $this->getId(),
$keys[1] => $this->getName(),
$keys[2] => $this->getSecured(),
$keys[3] => $this->getCreatedAt(),
$keys[4] => $this->getUpdatedAt(),
$keys[5] => $this->getVersion(),
$keys[6] => $this->getVersionCreatedAt(),
$keys[7] => $this->getVersionCreatedBy(),
$keys[3] => $this->getTextLayoutFileName(),
$keys[4] => $this->getTextTemplateFileName(),
$keys[5] => $this->getHtmlLayoutFileName(),
$keys[6] => $this->getHtmlTemplateFileName(),
$keys[7] => $this->getCreatedAt(),
$keys[8] => $this->getUpdatedAt(),
$keys[9] => $this->getVersion(),
$keys[10] => $this->getVersionCreatedAt(),
$keys[11] => $this->getVersionCreatedBy(),
);
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
@@ -1307,18 +1511,30 @@ abstract class Message implements ActiveRecordInterface
$this->setSecured($value);
break;
case 3:
$this->setCreatedAt($value);
$this->setTextLayoutFileName($value);
break;
case 4:
$this->setUpdatedAt($value);
$this->setTextTemplateFileName($value);
break;
case 5:
$this->setVersion($value);
$this->setHtmlLayoutFileName($value);
break;
case 6:
$this->setVersionCreatedAt($value);
$this->setHtmlTemplateFileName($value);
break;
case 7:
$this->setCreatedAt($value);
break;
case 8:
$this->setUpdatedAt($value);
break;
case 9:
$this->setVersion($value);
break;
case 10:
$this->setVersionCreatedAt($value);
break;
case 11:
$this->setVersionCreatedBy($value);
break;
} // switch()
@@ -1348,11 +1564,15 @@ abstract class Message implements ActiveRecordInterface
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setName($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setSecured($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setVersion($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setVersionCreatedAt($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setVersionCreatedBy($arr[$keys[7]]);
if (array_key_exists($keys[3], $arr)) $this->setTextLayoutFileName($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setTextTemplateFileName($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setHtmlLayoutFileName($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setHtmlTemplateFileName($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[9], $arr)) $this->setVersion($arr[$keys[9]]);
if (array_key_exists($keys[10], $arr)) $this->setVersionCreatedAt($arr[$keys[10]]);
if (array_key_exists($keys[11], $arr)) $this->setVersionCreatedBy($arr[$keys[11]]);
}
/**
@@ -1367,6 +1587,10 @@ abstract class Message implements ActiveRecordInterface
if ($this->isColumnModified(MessageTableMap::ID)) $criteria->add(MessageTableMap::ID, $this->id);
if ($this->isColumnModified(MessageTableMap::NAME)) $criteria->add(MessageTableMap::NAME, $this->name);
if ($this->isColumnModified(MessageTableMap::SECURED)) $criteria->add(MessageTableMap::SECURED, $this->secured);
if ($this->isColumnModified(MessageTableMap::TEXT_LAYOUT_FILE_NAME)) $criteria->add(MessageTableMap::TEXT_LAYOUT_FILE_NAME, $this->text_layout_file_name);
if ($this->isColumnModified(MessageTableMap::TEXT_TEMPLATE_FILE_NAME)) $criteria->add(MessageTableMap::TEXT_TEMPLATE_FILE_NAME, $this->text_template_file_name);
if ($this->isColumnModified(MessageTableMap::HTML_LAYOUT_FILE_NAME)) $criteria->add(MessageTableMap::HTML_LAYOUT_FILE_NAME, $this->html_layout_file_name);
if ($this->isColumnModified(MessageTableMap::HTML_TEMPLATE_FILE_NAME)) $criteria->add(MessageTableMap::HTML_TEMPLATE_FILE_NAME, $this->html_template_file_name);
if ($this->isColumnModified(MessageTableMap::CREATED_AT)) $criteria->add(MessageTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(MessageTableMap::UPDATED_AT)) $criteria->add(MessageTableMap::UPDATED_AT, $this->updated_at);
if ($this->isColumnModified(MessageTableMap::VERSION)) $criteria->add(MessageTableMap::VERSION, $this->version);
@@ -1437,6 +1661,10 @@ abstract class Message implements ActiveRecordInterface
{
$copyObj->setName($this->getName());
$copyObj->setSecured($this->getSecured());
$copyObj->setTextLayoutFileName($this->getTextLayoutFileName());
$copyObj->setTextTemplateFileName($this->getTextTemplateFileName());
$copyObj->setHtmlLayoutFileName($this->getHtmlLayoutFileName());
$copyObj->setHtmlTemplateFileName($this->getHtmlTemplateFileName());
$copyObj->setCreatedAt($this->getCreatedAt());
$copyObj->setUpdatedAt($this->getUpdatedAt());
$copyObj->setVersion($this->getVersion());
@@ -1963,6 +2191,10 @@ abstract class Message implements ActiveRecordInterface
$this->id = null;
$this->name = null;
$this->secured = null;
$this->text_layout_file_name = null;
$this->text_template_file_name = null;
$this->html_layout_file_name = null;
$this->html_template_file_name = null;
$this->created_at = null;
$this->updated_at = null;
$this->version = null;
@@ -2284,6 +2516,10 @@ abstract class Message implements ActiveRecordInterface
$version->setId($this->getId());
$version->setName($this->getName());
$version->setSecured($this->getSecured());
$version->setTextLayoutFileName($this->getTextLayoutFileName());
$version->setTextTemplateFileName($this->getTextTemplateFileName());
$version->setHtmlLayoutFileName($this->getHtmlLayoutFileName());
$version->setHtmlTemplateFileName($this->getHtmlTemplateFileName());
$version->setCreatedAt($this->getCreatedAt());
$version->setUpdatedAt($this->getUpdatedAt());
$version->setVersion($this->getVersion());
@@ -2329,6 +2565,10 @@ abstract class Message implements ActiveRecordInterface
$this->setId($version->getId());
$this->setName($version->getName());
$this->setSecured($version->getSecured());
$this->setTextLayoutFileName($version->getTextLayoutFileName());
$this->setTextTemplateFileName($version->getTextTemplateFileName());
$this->setHtmlLayoutFileName($version->getHtmlLayoutFileName());
$this->setHtmlTemplateFileName($version->getHtmlTemplateFileName());
$this->setCreatedAt($version->getCreatedAt());
$this->setUpdatedAt($version->getUpdatedAt());
$this->setVersion($version->getVersion());

View File

@@ -25,6 +25,10 @@ use Thelia\Model\Map\MessageTableMap;
* @method ChildMessageQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildMessageQuery orderByName($order = Criteria::ASC) Order by the name column
* @method ChildMessageQuery orderBySecured($order = Criteria::ASC) Order by the secured column
* @method ChildMessageQuery orderByTextLayoutFileName($order = Criteria::ASC) Order by the text_layout_file_name column
* @method ChildMessageQuery orderByTextTemplateFileName($order = Criteria::ASC) Order by the text_template_file_name column
* @method ChildMessageQuery orderByHtmlLayoutFileName($order = Criteria::ASC) Order by the html_layout_file_name column
* @method ChildMessageQuery orderByHtmlTemplateFileName($order = Criteria::ASC) Order by the html_template_file_name column
* @method ChildMessageQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ChildMessageQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
* @method ChildMessageQuery orderByVersion($order = Criteria::ASC) Order by the version column
@@ -34,6 +38,10 @@ use Thelia\Model\Map\MessageTableMap;
* @method ChildMessageQuery groupById() Group by the id column
* @method ChildMessageQuery groupByName() Group by the name column
* @method ChildMessageQuery groupBySecured() Group by the secured column
* @method ChildMessageQuery groupByTextLayoutFileName() Group by the text_layout_file_name column
* @method ChildMessageQuery groupByTextTemplateFileName() Group by the text_template_file_name column
* @method ChildMessageQuery groupByHtmlLayoutFileName() Group by the html_layout_file_name column
* @method ChildMessageQuery groupByHtmlTemplateFileName() Group by the html_template_file_name column
* @method ChildMessageQuery groupByCreatedAt() Group by the created_at column
* @method ChildMessageQuery groupByUpdatedAt() Group by the updated_at column
* @method ChildMessageQuery groupByVersion() Group by the version column
@@ -58,6 +66,10 @@ use Thelia\Model\Map\MessageTableMap;
* @method ChildMessage findOneById(int $id) Return the first ChildMessage filtered by the id column
* @method ChildMessage findOneByName(string $name) Return the first ChildMessage filtered by the name column
* @method ChildMessage findOneBySecured(int $secured) Return the first ChildMessage filtered by the secured column
* @method ChildMessage findOneByTextLayoutFileName(string $text_layout_file_name) Return the first ChildMessage filtered by the text_layout_file_name column
* @method ChildMessage findOneByTextTemplateFileName(string $text_template_file_name) Return the first ChildMessage filtered by the text_template_file_name column
* @method ChildMessage findOneByHtmlLayoutFileName(string $html_layout_file_name) Return the first ChildMessage filtered by the html_layout_file_name column
* @method ChildMessage findOneByHtmlTemplateFileName(string $html_template_file_name) Return the first ChildMessage filtered by the html_template_file_name column
* @method ChildMessage findOneByCreatedAt(string $created_at) Return the first ChildMessage filtered by the created_at column
* @method ChildMessage findOneByUpdatedAt(string $updated_at) Return the first ChildMessage filtered by the updated_at column
* @method ChildMessage findOneByVersion(int $version) Return the first ChildMessage filtered by the version column
@@ -67,6 +79,10 @@ use Thelia\Model\Map\MessageTableMap;
* @method array findById(int $id) Return ChildMessage objects filtered by the id column
* @method array findByName(string $name) Return ChildMessage objects filtered by the name column
* @method array findBySecured(int $secured) Return ChildMessage objects filtered by the secured column
* @method array findByTextLayoutFileName(string $text_layout_file_name) Return ChildMessage objects filtered by the text_layout_file_name column
* @method array findByTextTemplateFileName(string $text_template_file_name) Return ChildMessage objects filtered by the text_template_file_name column
* @method array findByHtmlLayoutFileName(string $html_layout_file_name) Return ChildMessage objects filtered by the html_layout_file_name column
* @method array findByHtmlTemplateFileName(string $html_template_file_name) Return ChildMessage objects filtered by the html_template_file_name column
* @method array findByCreatedAt(string $created_at) Return ChildMessage objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ChildMessage objects filtered by the updated_at column
* @method array findByVersion(int $version) Return ChildMessage objects filtered by the version column
@@ -167,7 +183,7 @@ abstract class MessageQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT ID, NAME, SECURED, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM message WHERE ID = :p0';
$sql = 'SELECT ID, NAME, SECURED, TEXT_LAYOUT_FILE_NAME, TEXT_TEMPLATE_FILE_NAME, HTML_LAYOUT_FILE_NAME, HTML_TEMPLATE_FILE_NAME, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM message WHERE ID = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -367,6 +383,122 @@ abstract class MessageQuery extends ModelCriteria
return $this->addUsingAlias(MessageTableMap::SECURED, $secured, $comparison);
}
/**
* Filter the query on the text_layout_file_name column
*
* Example usage:
* <code>
* $query->filterByTextLayoutFileName('fooValue'); // WHERE text_layout_file_name = 'fooValue'
* $query->filterByTextLayoutFileName('%fooValue%'); // WHERE text_layout_file_name LIKE '%fooValue%'
* </code>
*
* @param string $textLayoutFileName The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildMessageQuery The current query, for fluid interface
*/
public function filterByTextLayoutFileName($textLayoutFileName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($textLayoutFileName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $textLayoutFileName)) {
$textLayoutFileName = str_replace('*', '%', $textLayoutFileName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MessageTableMap::TEXT_LAYOUT_FILE_NAME, $textLayoutFileName, $comparison);
}
/**
* Filter the query on the text_template_file_name column
*
* Example usage:
* <code>
* $query->filterByTextTemplateFileName('fooValue'); // WHERE text_template_file_name = 'fooValue'
* $query->filterByTextTemplateFileName('%fooValue%'); // WHERE text_template_file_name LIKE '%fooValue%'
* </code>
*
* @param string $textTemplateFileName The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildMessageQuery The current query, for fluid interface
*/
public function filterByTextTemplateFileName($textTemplateFileName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($textTemplateFileName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $textTemplateFileName)) {
$textTemplateFileName = str_replace('*', '%', $textTemplateFileName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MessageTableMap::TEXT_TEMPLATE_FILE_NAME, $textTemplateFileName, $comparison);
}
/**
* Filter the query on the html_layout_file_name column
*
* Example usage:
* <code>
* $query->filterByHtmlLayoutFileName('fooValue'); // WHERE html_layout_file_name = 'fooValue'
* $query->filterByHtmlLayoutFileName('%fooValue%'); // WHERE html_layout_file_name LIKE '%fooValue%'
* </code>
*
* @param string $htmlLayoutFileName The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildMessageQuery The current query, for fluid interface
*/
public function filterByHtmlLayoutFileName($htmlLayoutFileName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($htmlLayoutFileName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $htmlLayoutFileName)) {
$htmlLayoutFileName = str_replace('*', '%', $htmlLayoutFileName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MessageTableMap::HTML_LAYOUT_FILE_NAME, $htmlLayoutFileName, $comparison);
}
/**
* Filter the query on the html_template_file_name column
*
* Example usage:
* <code>
* $query->filterByHtmlTemplateFileName('fooValue'); // WHERE html_template_file_name = 'fooValue'
* $query->filterByHtmlTemplateFileName('%fooValue%'); // WHERE html_template_file_name LIKE '%fooValue%'
* </code>
*
* @param string $htmlTemplateFileName The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildMessageQuery The current query, for fluid interface
*/
public function filterByHtmlTemplateFileName($htmlTemplateFileName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($htmlTemplateFileName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $htmlTemplateFileName)) {
$htmlTemplateFileName = str_replace('*', '%', $htmlTemplateFileName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MessageTableMap::HTML_TEMPLATE_FILE_NAME, $htmlTemplateFileName, $comparison);
}
/**
* Filter the query on the created_at column
*

View File

@@ -73,6 +73,30 @@ abstract class MessageVersion implements ActiveRecordInterface
*/
protected $secured;
/**
* The value for the text_layout_file_name field.
* @var string
*/
protected $text_layout_file_name;
/**
* The value for the text_template_file_name field.
* @var string
*/
protected $text_template_file_name;
/**
* The value for the html_layout_file_name field.
* @var string
*/
protected $html_layout_file_name;
/**
* The value for the html_template_file_name field.
* @var string
*/
protected $html_template_file_name;
/**
* The value for the created_at field.
* @var string
@@ -421,6 +445,50 @@ abstract class MessageVersion implements ActiveRecordInterface
return $this->secured;
}
/**
* Get the [text_layout_file_name] column value.
*
* @return string
*/
public function getTextLayoutFileName()
{
return $this->text_layout_file_name;
}
/**
* Get the [text_template_file_name] column value.
*
* @return string
*/
public function getTextTemplateFileName()
{
return $this->text_template_file_name;
}
/**
* Get the [html_layout_file_name] column value.
*
* @return string
*/
public function getHtmlLayoutFileName()
{
return $this->html_layout_file_name;
}
/**
* Get the [html_template_file_name] column value.
*
* @return string
*/
public function getHtmlTemplateFileName()
{
return $this->html_template_file_name;
}
/**
* Get the [optionally formatted] temporal [created_at] column value.
*
@@ -570,6 +638,90 @@ abstract class MessageVersion implements ActiveRecordInterface
return $this;
} // setSecured()
/**
* Set the value of [text_layout_file_name] column.
*
* @param string $v new value
* @return \Thelia\Model\MessageVersion The current object (for fluent API support)
*/
public function setTextLayoutFileName($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->text_layout_file_name !== $v) {
$this->text_layout_file_name = $v;
$this->modifiedColumns[] = MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME;
}
return $this;
} // setTextLayoutFileName()
/**
* Set the value of [text_template_file_name] column.
*
* @param string $v new value
* @return \Thelia\Model\MessageVersion The current object (for fluent API support)
*/
public function setTextTemplateFileName($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->text_template_file_name !== $v) {
$this->text_template_file_name = $v;
$this->modifiedColumns[] = MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME;
}
return $this;
} // setTextTemplateFileName()
/**
* Set the value of [html_layout_file_name] column.
*
* @param string $v new value
* @return \Thelia\Model\MessageVersion The current object (for fluent API support)
*/
public function setHtmlLayoutFileName($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->html_layout_file_name !== $v) {
$this->html_layout_file_name = $v;
$this->modifiedColumns[] = MessageVersionTableMap::HTML_LAYOUT_FILE_NAME;
}
return $this;
} // setHtmlLayoutFileName()
/**
* Set the value of [html_template_file_name] column.
*
* @param string $v new value
* @return \Thelia\Model\MessageVersion The current object (for fluent API support)
*/
public function setHtmlTemplateFileName($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->html_template_file_name !== $v) {
$this->html_template_file_name = $v;
$this->modifiedColumns[] = MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME;
}
return $this;
} // setHtmlTemplateFileName()
/**
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
*
@@ -725,28 +877,40 @@ abstract class MessageVersion implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : MessageVersionTableMap::translateFieldName('Secured', TableMap::TYPE_PHPNAME, $indexType)];
$this->secured = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageVersionTableMap::translateFieldName('TextLayoutFileName', TableMap::TYPE_PHPNAME, $indexType)];
$this->text_layout_file_name = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageVersionTableMap::translateFieldName('TextTemplateFileName', TableMap::TYPE_PHPNAME, $indexType)];
$this->text_template_file_name = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : MessageVersionTableMap::translateFieldName('HtmlLayoutFileName', TableMap::TYPE_PHPNAME, $indexType)];
$this->html_layout_file_name = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : MessageVersionTableMap::translateFieldName('HtmlTemplateFileName', TableMap::TYPE_PHPNAME, $indexType)];
$this->html_template_file_name = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : MessageVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : MessageVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : MessageVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : MessageVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
$this->version = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : MessageVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : MessageVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
$this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : MessageVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : MessageVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
$this->version_created_by = (null !== $col) ? (string) $col : null;
$this->resetModified();
@@ -756,7 +920,7 @@ abstract class MessageVersion implements ActiveRecordInterface
$this->ensureConsistency();
}
return $startcol + 8; // 8 = MessageVersionTableMap::NUM_HYDRATE_COLUMNS.
return $startcol + 12; // 12 = MessageVersionTableMap::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating \Thelia\Model\MessageVersion object", 0, $e);
@@ -986,6 +1150,18 @@ abstract class MessageVersion implements ActiveRecordInterface
if ($this->isColumnModified(MessageVersionTableMap::SECURED)) {
$modifiedColumns[':p' . $index++] = 'SECURED';
}
if ($this->isColumnModified(MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME)) {
$modifiedColumns[':p' . $index++] = 'TEXT_LAYOUT_FILE_NAME';
}
if ($this->isColumnModified(MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME)) {
$modifiedColumns[':p' . $index++] = 'TEXT_TEMPLATE_FILE_NAME';
}
if ($this->isColumnModified(MessageVersionTableMap::HTML_LAYOUT_FILE_NAME)) {
$modifiedColumns[':p' . $index++] = 'HTML_LAYOUT_FILE_NAME';
}
if ($this->isColumnModified(MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME)) {
$modifiedColumns[':p' . $index++] = 'HTML_TEMPLATE_FILE_NAME';
}
if ($this->isColumnModified(MessageVersionTableMap::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
}
@@ -1021,6 +1197,18 @@ abstract class MessageVersion implements ActiveRecordInterface
case 'SECURED':
$stmt->bindValue($identifier, $this->secured, PDO::PARAM_INT);
break;
case 'TEXT_LAYOUT_FILE_NAME':
$stmt->bindValue($identifier, $this->text_layout_file_name, PDO::PARAM_STR);
break;
case 'TEXT_TEMPLATE_FILE_NAME':
$stmt->bindValue($identifier, $this->text_template_file_name, PDO::PARAM_STR);
break;
case 'HTML_LAYOUT_FILE_NAME':
$stmt->bindValue($identifier, $this->html_layout_file_name, PDO::PARAM_STR);
break;
case 'HTML_TEMPLATE_FILE_NAME':
$stmt->bindValue($identifier, $this->html_template_file_name, 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;
@@ -1101,18 +1289,30 @@ abstract class MessageVersion implements ActiveRecordInterface
return $this->getSecured();
break;
case 3:
return $this->getCreatedAt();
return $this->getTextLayoutFileName();
break;
case 4:
return $this->getUpdatedAt();
return $this->getTextTemplateFileName();
break;
case 5:
return $this->getVersion();
return $this->getHtmlLayoutFileName();
break;
case 6:
return $this->getVersionCreatedAt();
return $this->getHtmlTemplateFileName();
break;
case 7:
return $this->getCreatedAt();
break;
case 8:
return $this->getUpdatedAt();
break;
case 9:
return $this->getVersion();
break;
case 10:
return $this->getVersionCreatedAt();
break;
case 11:
return $this->getVersionCreatedBy();
break;
default:
@@ -1147,11 +1347,15 @@ abstract class MessageVersion implements ActiveRecordInterface
$keys[0] => $this->getId(),
$keys[1] => $this->getName(),
$keys[2] => $this->getSecured(),
$keys[3] => $this->getCreatedAt(),
$keys[4] => $this->getUpdatedAt(),
$keys[5] => $this->getVersion(),
$keys[6] => $this->getVersionCreatedAt(),
$keys[7] => $this->getVersionCreatedBy(),
$keys[3] => $this->getTextLayoutFileName(),
$keys[4] => $this->getTextTemplateFileName(),
$keys[5] => $this->getHtmlLayoutFileName(),
$keys[6] => $this->getHtmlTemplateFileName(),
$keys[7] => $this->getCreatedAt(),
$keys[8] => $this->getUpdatedAt(),
$keys[9] => $this->getVersion(),
$keys[10] => $this->getVersionCreatedAt(),
$keys[11] => $this->getVersionCreatedBy(),
);
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
@@ -1206,18 +1410,30 @@ abstract class MessageVersion implements ActiveRecordInterface
$this->setSecured($value);
break;
case 3:
$this->setCreatedAt($value);
$this->setTextLayoutFileName($value);
break;
case 4:
$this->setUpdatedAt($value);
$this->setTextTemplateFileName($value);
break;
case 5:
$this->setVersion($value);
$this->setHtmlLayoutFileName($value);
break;
case 6:
$this->setVersionCreatedAt($value);
$this->setHtmlTemplateFileName($value);
break;
case 7:
$this->setCreatedAt($value);
break;
case 8:
$this->setUpdatedAt($value);
break;
case 9:
$this->setVersion($value);
break;
case 10:
$this->setVersionCreatedAt($value);
break;
case 11:
$this->setVersionCreatedBy($value);
break;
} // switch()
@@ -1247,11 +1463,15 @@ abstract class MessageVersion implements ActiveRecordInterface
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setName($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setSecured($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setVersion($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setVersionCreatedAt($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setVersionCreatedBy($arr[$keys[7]]);
if (array_key_exists($keys[3], $arr)) $this->setTextLayoutFileName($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setTextTemplateFileName($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setHtmlLayoutFileName($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setHtmlTemplateFileName($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[9], $arr)) $this->setVersion($arr[$keys[9]]);
if (array_key_exists($keys[10], $arr)) $this->setVersionCreatedAt($arr[$keys[10]]);
if (array_key_exists($keys[11], $arr)) $this->setVersionCreatedBy($arr[$keys[11]]);
}
/**
@@ -1266,6 +1486,10 @@ abstract class MessageVersion implements ActiveRecordInterface
if ($this->isColumnModified(MessageVersionTableMap::ID)) $criteria->add(MessageVersionTableMap::ID, $this->id);
if ($this->isColumnModified(MessageVersionTableMap::NAME)) $criteria->add(MessageVersionTableMap::NAME, $this->name);
if ($this->isColumnModified(MessageVersionTableMap::SECURED)) $criteria->add(MessageVersionTableMap::SECURED, $this->secured);
if ($this->isColumnModified(MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME)) $criteria->add(MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME, $this->text_layout_file_name);
if ($this->isColumnModified(MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME)) $criteria->add(MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME, $this->text_template_file_name);
if ($this->isColumnModified(MessageVersionTableMap::HTML_LAYOUT_FILE_NAME)) $criteria->add(MessageVersionTableMap::HTML_LAYOUT_FILE_NAME, $this->html_layout_file_name);
if ($this->isColumnModified(MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME)) $criteria->add(MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME, $this->html_template_file_name);
if ($this->isColumnModified(MessageVersionTableMap::CREATED_AT)) $criteria->add(MessageVersionTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(MessageVersionTableMap::UPDATED_AT)) $criteria->add(MessageVersionTableMap::UPDATED_AT, $this->updated_at);
if ($this->isColumnModified(MessageVersionTableMap::VERSION)) $criteria->add(MessageVersionTableMap::VERSION, $this->version);
@@ -1344,6 +1568,10 @@ abstract class MessageVersion implements ActiveRecordInterface
$copyObj->setId($this->getId());
$copyObj->setName($this->getName());
$copyObj->setSecured($this->getSecured());
$copyObj->setTextLayoutFileName($this->getTextLayoutFileName());
$copyObj->setTextTemplateFileName($this->getTextTemplateFileName());
$copyObj->setHtmlLayoutFileName($this->getHtmlLayoutFileName());
$copyObj->setHtmlTemplateFileName($this->getHtmlTemplateFileName());
$copyObj->setCreatedAt($this->getCreatedAt());
$copyObj->setUpdatedAt($this->getUpdatedAt());
$copyObj->setVersion($this->getVersion());
@@ -1435,6 +1663,10 @@ abstract class MessageVersion implements ActiveRecordInterface
$this->id = null;
$this->name = null;
$this->secured = null;
$this->text_layout_file_name = null;
$this->text_template_file_name = null;
$this->html_layout_file_name = null;
$this->html_template_file_name = null;
$this->created_at = null;
$this->updated_at = null;
$this->version = null;

View File

@@ -24,6 +24,10 @@ use Thelia\Model\Map\MessageVersionTableMap;
* @method ChildMessageVersionQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildMessageVersionQuery orderByName($order = Criteria::ASC) Order by the name column
* @method ChildMessageVersionQuery orderBySecured($order = Criteria::ASC) Order by the secured column
* @method ChildMessageVersionQuery orderByTextLayoutFileName($order = Criteria::ASC) Order by the text_layout_file_name column
* @method ChildMessageVersionQuery orderByTextTemplateFileName($order = Criteria::ASC) Order by the text_template_file_name column
* @method ChildMessageVersionQuery orderByHtmlLayoutFileName($order = Criteria::ASC) Order by the html_layout_file_name column
* @method ChildMessageVersionQuery orderByHtmlTemplateFileName($order = Criteria::ASC) Order by the html_template_file_name column
* @method ChildMessageVersionQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ChildMessageVersionQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
* @method ChildMessageVersionQuery orderByVersion($order = Criteria::ASC) Order by the version column
@@ -33,6 +37,10 @@ use Thelia\Model\Map\MessageVersionTableMap;
* @method ChildMessageVersionQuery groupById() Group by the id column
* @method ChildMessageVersionQuery groupByName() Group by the name column
* @method ChildMessageVersionQuery groupBySecured() Group by the secured column
* @method ChildMessageVersionQuery groupByTextLayoutFileName() Group by the text_layout_file_name column
* @method ChildMessageVersionQuery groupByTextTemplateFileName() Group by the text_template_file_name column
* @method ChildMessageVersionQuery groupByHtmlLayoutFileName() Group by the html_layout_file_name column
* @method ChildMessageVersionQuery groupByHtmlTemplateFileName() Group by the html_template_file_name column
* @method ChildMessageVersionQuery groupByCreatedAt() Group by the created_at column
* @method ChildMessageVersionQuery groupByUpdatedAt() Group by the updated_at column
* @method ChildMessageVersionQuery groupByVersion() Group by the version column
@@ -53,6 +61,10 @@ use Thelia\Model\Map\MessageVersionTableMap;
* @method ChildMessageVersion findOneById(int $id) Return the first ChildMessageVersion filtered by the id column
* @method ChildMessageVersion findOneByName(string $name) Return the first ChildMessageVersion filtered by the name column
* @method ChildMessageVersion findOneBySecured(int $secured) Return the first ChildMessageVersion filtered by the secured column
* @method ChildMessageVersion findOneByTextLayoutFileName(string $text_layout_file_name) Return the first ChildMessageVersion filtered by the text_layout_file_name column
* @method ChildMessageVersion findOneByTextTemplateFileName(string $text_template_file_name) Return the first ChildMessageVersion filtered by the text_template_file_name column
* @method ChildMessageVersion findOneByHtmlLayoutFileName(string $html_layout_file_name) Return the first ChildMessageVersion filtered by the html_layout_file_name column
* @method ChildMessageVersion findOneByHtmlTemplateFileName(string $html_template_file_name) Return the first ChildMessageVersion filtered by the html_template_file_name column
* @method ChildMessageVersion findOneByCreatedAt(string $created_at) Return the first ChildMessageVersion filtered by the created_at column
* @method ChildMessageVersion findOneByUpdatedAt(string $updated_at) Return the first ChildMessageVersion filtered by the updated_at column
* @method ChildMessageVersion findOneByVersion(int $version) Return the first ChildMessageVersion filtered by the version column
@@ -62,6 +74,10 @@ use Thelia\Model\Map\MessageVersionTableMap;
* @method array findById(int $id) Return ChildMessageVersion objects filtered by the id column
* @method array findByName(string $name) Return ChildMessageVersion objects filtered by the name column
* @method array findBySecured(int $secured) Return ChildMessageVersion objects filtered by the secured column
* @method array findByTextLayoutFileName(string $text_layout_file_name) Return ChildMessageVersion objects filtered by the text_layout_file_name column
* @method array findByTextTemplateFileName(string $text_template_file_name) Return ChildMessageVersion objects filtered by the text_template_file_name column
* @method array findByHtmlLayoutFileName(string $html_layout_file_name) Return ChildMessageVersion objects filtered by the html_layout_file_name column
* @method array findByHtmlTemplateFileName(string $html_template_file_name) Return ChildMessageVersion objects filtered by the html_template_file_name column
* @method array findByCreatedAt(string $created_at) Return ChildMessageVersion objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ChildMessageVersion objects filtered by the updated_at column
* @method array findByVersion(int $version) Return ChildMessageVersion objects filtered by the version column
@@ -155,7 +171,7 @@ abstract class MessageVersionQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT ID, NAME, SECURED, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM message_version WHERE ID = :p0 AND VERSION = :p1';
$sql = 'SELECT ID, NAME, SECURED, TEXT_LAYOUT_FILE_NAME, TEXT_TEMPLATE_FILE_NAME, HTML_LAYOUT_FILE_NAME, HTML_TEMPLATE_FILE_NAME, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM message_version WHERE ID = :p0 AND VERSION = :p1';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
@@ -369,6 +385,122 @@ abstract class MessageVersionQuery extends ModelCriteria
return $this->addUsingAlias(MessageVersionTableMap::SECURED, $secured, $comparison);
}
/**
* Filter the query on the text_layout_file_name column
*
* Example usage:
* <code>
* $query->filterByTextLayoutFileName('fooValue'); // WHERE text_layout_file_name = 'fooValue'
* $query->filterByTextLayoutFileName('%fooValue%'); // WHERE text_layout_file_name LIKE '%fooValue%'
* </code>
*
* @param string $textLayoutFileName The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildMessageVersionQuery The current query, for fluid interface
*/
public function filterByTextLayoutFileName($textLayoutFileName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($textLayoutFileName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $textLayoutFileName)) {
$textLayoutFileName = str_replace('*', '%', $textLayoutFileName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME, $textLayoutFileName, $comparison);
}
/**
* Filter the query on the text_template_file_name column
*
* Example usage:
* <code>
* $query->filterByTextTemplateFileName('fooValue'); // WHERE text_template_file_name = 'fooValue'
* $query->filterByTextTemplateFileName('%fooValue%'); // WHERE text_template_file_name LIKE '%fooValue%'
* </code>
*
* @param string $textTemplateFileName The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildMessageVersionQuery The current query, for fluid interface
*/
public function filterByTextTemplateFileName($textTemplateFileName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($textTemplateFileName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $textTemplateFileName)) {
$textTemplateFileName = str_replace('*', '%', $textTemplateFileName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME, $textTemplateFileName, $comparison);
}
/**
* Filter the query on the html_layout_file_name column
*
* Example usage:
* <code>
* $query->filterByHtmlLayoutFileName('fooValue'); // WHERE html_layout_file_name = 'fooValue'
* $query->filterByHtmlLayoutFileName('%fooValue%'); // WHERE html_layout_file_name LIKE '%fooValue%'
* </code>
*
* @param string $htmlLayoutFileName The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildMessageVersionQuery The current query, for fluid interface
*/
public function filterByHtmlLayoutFileName($htmlLayoutFileName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($htmlLayoutFileName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $htmlLayoutFileName)) {
$htmlLayoutFileName = str_replace('*', '%', $htmlLayoutFileName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MessageVersionTableMap::HTML_LAYOUT_FILE_NAME, $htmlLayoutFileName, $comparison);
}
/**
* Filter the query on the html_template_file_name column
*
* Example usage:
* <code>
* $query->filterByHtmlTemplateFileName('fooValue'); // WHERE html_template_file_name = 'fooValue'
* $query->filterByHtmlTemplateFileName('%fooValue%'); // WHERE html_template_file_name LIKE '%fooValue%'
* </code>
*
* @param string $htmlTemplateFileName The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildMessageVersionQuery The current query, for fluid interface
*/
public function filterByHtmlTemplateFileName($htmlTemplateFileName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($htmlTemplateFileName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $htmlTemplateFileName)) {
$htmlTemplateFileName = str_replace('*', '%', $htmlTemplateFileName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME, $htmlTemplateFileName, $comparison);
}
/**
* Filter the query on the created_at column
*

View File

@@ -5866,6 +5866,78 @@ abstract class Product implements ActiveRecordInterface
return $this;
}
/**
* Get the [meta_title] column value.
*
* @return string
*/
public function getMetaTitle()
{
return $this->getCurrentTranslation()->getMetaTitle();
}
/**
* Set the value of [meta_title] column.
*
* @param string $v new value
* @return \Thelia\Model\ProductI18n The current object (for fluent API support)
*/
public function setMetaTitle($v)
{ $this->getCurrentTranslation()->setMetaTitle($v);
return $this;
}
/**
* Get the [meta_description] column value.
*
* @return string
*/
public function getMetaDescription()
{
return $this->getCurrentTranslation()->getMetaDescription();
}
/**
* Set the value of [meta_description] column.
*
* @param string $v new value
* @return \Thelia\Model\ProductI18n The current object (for fluent API support)
*/
public function setMetaDescription($v)
{ $this->getCurrentTranslation()->setMetaDescription($v);
return $this;
}
/**
* Get the [meta_keyword] column value.
*
* @return string
*/
public function getMetaKeyword()
{
return $this->getCurrentTranslation()->getMetaKeyword();
}
/**
* Set the value of [meta_keyword] column.
*
* @param string $v new value
* @return \Thelia\Model\ProductI18n The current object (for fluent API support)
*/
public function setMetaKeyword($v)
{ $this->getCurrentTranslation()->setMetaKeyword($v);
return $this;
}
// versionable behavior
/**

View File

@@ -90,6 +90,24 @@ abstract class ProductI18n implements ActiveRecordInterface
*/
protected $postscriptum;
/**
* The value for the meta_title field.
* @var string
*/
protected $meta_title;
/**
* The value for the meta_description field.
* @var string
*/
protected $meta_description;
/**
* The value for the meta_keyword field.
* @var string
*/
protected $meta_keyword;
/**
* @var Product
*/
@@ -440,6 +458,39 @@ abstract class ProductI18n implements ActiveRecordInterface
return $this->postscriptum;
}
/**
* Get the [meta_title] column value.
*
* @return string
*/
public function getMetaTitle()
{
return $this->meta_title;
}
/**
* Get the [meta_description] column value.
*
* @return string
*/
public function getMetaDescription()
{
return $this->meta_description;
}
/**
* Get the [meta_keyword] column value.
*
* @return string
*/
public function getMetaKeyword()
{
return $this->meta_keyword;
}
/**
* Set the value of [id] column.
*
@@ -570,6 +621,69 @@ abstract class ProductI18n implements ActiveRecordInterface
return $this;
} // setPostscriptum()
/**
* Set the value of [meta_title] column.
*
* @param string $v new value
* @return \Thelia\Model\ProductI18n The current object (for fluent API support)
*/
public function setMetaTitle($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->meta_title !== $v) {
$this->meta_title = $v;
$this->modifiedColumns[] = ProductI18nTableMap::META_TITLE;
}
return $this;
} // setMetaTitle()
/**
* Set the value of [meta_description] column.
*
* @param string $v new value
* @return \Thelia\Model\ProductI18n The current object (for fluent API support)
*/
public function setMetaDescription($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->meta_description !== $v) {
$this->meta_description = $v;
$this->modifiedColumns[] = ProductI18nTableMap::META_DESCRIPTION;
}
return $this;
} // setMetaDescription()
/**
* Set the value of [meta_keyword] column.
*
* @param string $v new value
* @return \Thelia\Model\ProductI18n The current object (for fluent API support)
*/
public function setMetaKeyword($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->meta_keyword !== $v) {
$this->meta_keyword = $v;
$this->modifiedColumns[] = ProductI18nTableMap::META_KEYWORD;
}
return $this;
} // setMetaKeyword()
/**
* Indicates whether the columns in this object are only set to default values.
*
@@ -628,6 +742,15 @@ abstract class ProductI18n implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ProductI18nTableMap::translateFieldName('Postscriptum', TableMap::TYPE_PHPNAME, $indexType)];
$this->postscriptum = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : ProductI18nTableMap::translateFieldName('MetaTitle', TableMap::TYPE_PHPNAME, $indexType)];
$this->meta_title = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : ProductI18nTableMap::translateFieldName('MetaDescription', TableMap::TYPE_PHPNAME, $indexType)];
$this->meta_description = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : ProductI18nTableMap::translateFieldName('MetaKeyword', TableMap::TYPE_PHPNAME, $indexType)];
$this->meta_keyword = (null !== $col) ? (string) $col : null;
$this->resetModified();
$this->setNew(false);
@@ -636,7 +759,7 @@ abstract class ProductI18n implements ActiveRecordInterface
$this->ensureConsistency();
}
return $startcol + 6; // 6 = ProductI18nTableMap::NUM_HYDRATE_COLUMNS.
return $startcol + 9; // 9 = ProductI18nTableMap::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating \Thelia\Model\ProductI18n object", 0, $e);
@@ -875,6 +998,15 @@ abstract class ProductI18n implements ActiveRecordInterface
if ($this->isColumnModified(ProductI18nTableMap::POSTSCRIPTUM)) {
$modifiedColumns[':p' . $index++] = 'POSTSCRIPTUM';
}
if ($this->isColumnModified(ProductI18nTableMap::META_TITLE)) {
$modifiedColumns[':p' . $index++] = 'META_TITLE';
}
if ($this->isColumnModified(ProductI18nTableMap::META_DESCRIPTION)) {
$modifiedColumns[':p' . $index++] = 'META_DESCRIPTION';
}
if ($this->isColumnModified(ProductI18nTableMap::META_KEYWORD)) {
$modifiedColumns[':p' . $index++] = 'META_KEYWORD';
}
$sql = sprintf(
'INSERT INTO product_i18n (%s) VALUES (%s)',
@@ -904,6 +1036,15 @@ abstract class ProductI18n implements ActiveRecordInterface
case 'POSTSCRIPTUM':
$stmt->bindValue($identifier, $this->postscriptum, PDO::PARAM_STR);
break;
case 'META_TITLE':
$stmt->bindValue($identifier, $this->meta_title, PDO::PARAM_STR);
break;
case 'META_DESCRIPTION':
$stmt->bindValue($identifier, $this->meta_description, PDO::PARAM_STR);
break;
case 'META_KEYWORD':
$stmt->bindValue($identifier, $this->meta_keyword, PDO::PARAM_STR);
break;
}
}
$stmt->execute();
@@ -977,6 +1118,15 @@ abstract class ProductI18n implements ActiveRecordInterface
case 5:
return $this->getPostscriptum();
break;
case 6:
return $this->getMetaTitle();
break;
case 7:
return $this->getMetaDescription();
break;
case 8:
return $this->getMetaKeyword();
break;
default:
return null;
break;
@@ -1012,6 +1162,9 @@ abstract class ProductI18n implements ActiveRecordInterface
$keys[3] => $this->getDescription(),
$keys[4] => $this->getChapo(),
$keys[5] => $this->getPostscriptum(),
$keys[6] => $this->getMetaTitle(),
$keys[7] => $this->getMetaDescription(),
$keys[8] => $this->getMetaKeyword(),
);
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
@@ -1074,6 +1227,15 @@ abstract class ProductI18n implements ActiveRecordInterface
case 5:
$this->setPostscriptum($value);
break;
case 6:
$this->setMetaTitle($value);
break;
case 7:
$this->setMetaDescription($value);
break;
case 8:
$this->setMetaKeyword($value);
break;
} // switch()
}
@@ -1104,6 +1266,9 @@ abstract class ProductI18n implements ActiveRecordInterface
if (array_key_exists($keys[3], $arr)) $this->setDescription($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setChapo($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setPostscriptum($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setMetaTitle($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setMetaDescription($arr[$keys[7]]);
if (array_key_exists($keys[8], $arr)) $this->setMetaKeyword($arr[$keys[8]]);
}
/**
@@ -1121,6 +1286,9 @@ abstract class ProductI18n implements ActiveRecordInterface
if ($this->isColumnModified(ProductI18nTableMap::DESCRIPTION)) $criteria->add(ProductI18nTableMap::DESCRIPTION, $this->description);
if ($this->isColumnModified(ProductI18nTableMap::CHAPO)) $criteria->add(ProductI18nTableMap::CHAPO, $this->chapo);
if ($this->isColumnModified(ProductI18nTableMap::POSTSCRIPTUM)) $criteria->add(ProductI18nTableMap::POSTSCRIPTUM, $this->postscriptum);
if ($this->isColumnModified(ProductI18nTableMap::META_TITLE)) $criteria->add(ProductI18nTableMap::META_TITLE, $this->meta_title);
if ($this->isColumnModified(ProductI18nTableMap::META_DESCRIPTION)) $criteria->add(ProductI18nTableMap::META_DESCRIPTION, $this->meta_description);
if ($this->isColumnModified(ProductI18nTableMap::META_KEYWORD)) $criteria->add(ProductI18nTableMap::META_KEYWORD, $this->meta_keyword);
return $criteria;
}
@@ -1197,6 +1365,9 @@ abstract class ProductI18n implements ActiveRecordInterface
$copyObj->setDescription($this->getDescription());
$copyObj->setChapo($this->getChapo());
$copyObj->setPostscriptum($this->getPostscriptum());
$copyObj->setMetaTitle($this->getMetaTitle());
$copyObj->setMetaDescription($this->getMetaDescription());
$copyObj->setMetaKeyword($this->getMetaKeyword());
if ($makeNew) {
$copyObj->setNew(true);
}
@@ -1286,6 +1457,9 @@ abstract class ProductI18n implements ActiveRecordInterface
$this->description = null;
$this->chapo = null;
$this->postscriptum = null;
$this->meta_title = null;
$this->meta_description = null;
$this->meta_keyword = null;
$this->alreadyInSave = false;
$this->clearAllReferences();
$this->applyDefaultValues();

View File

@@ -27,6 +27,9 @@ use Thelia\Model\Map\ProductI18nTableMap;
* @method ChildProductI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method ChildProductI18nQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method ChildProductI18nQuery orderByPostscriptum($order = Criteria::ASC) Order by the postscriptum column
* @method ChildProductI18nQuery orderByMetaTitle($order = Criteria::ASC) Order by the meta_title column
* @method ChildProductI18nQuery orderByMetaDescription($order = Criteria::ASC) Order by the meta_description column
* @method ChildProductI18nQuery orderByMetaKeyword($order = Criteria::ASC) Order by the meta_keyword column
*
* @method ChildProductI18nQuery groupById() Group by the id column
* @method ChildProductI18nQuery groupByLocale() Group by the locale column
@@ -34,6 +37,9 @@ use Thelia\Model\Map\ProductI18nTableMap;
* @method ChildProductI18nQuery groupByDescription() Group by the description column
* @method ChildProductI18nQuery groupByChapo() Group by the chapo column
* @method ChildProductI18nQuery groupByPostscriptum() Group by the postscriptum column
* @method ChildProductI18nQuery groupByMetaTitle() Group by the meta_title column
* @method ChildProductI18nQuery groupByMetaDescription() Group by the meta_description column
* @method ChildProductI18nQuery groupByMetaKeyword() Group by the meta_keyword column
*
* @method ChildProductI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method ChildProductI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
@@ -52,6 +58,9 @@ use Thelia\Model\Map\ProductI18nTableMap;
* @method ChildProductI18n findOneByDescription(string $description) Return the first ChildProductI18n filtered by the description column
* @method ChildProductI18n findOneByChapo(string $chapo) Return the first ChildProductI18n filtered by the chapo column
* @method ChildProductI18n findOneByPostscriptum(string $postscriptum) Return the first ChildProductI18n filtered by the postscriptum column
* @method ChildProductI18n findOneByMetaTitle(string $meta_title) Return the first ChildProductI18n filtered by the meta_title column
* @method ChildProductI18n findOneByMetaDescription(string $meta_description) Return the first ChildProductI18n filtered by the meta_description column
* @method ChildProductI18n findOneByMetaKeyword(string $meta_keyword) Return the first ChildProductI18n filtered by the meta_keyword column
*
* @method array findById(int $id) Return ChildProductI18n objects filtered by the id column
* @method array findByLocale(string $locale) Return ChildProductI18n objects filtered by the locale column
@@ -59,6 +68,9 @@ use Thelia\Model\Map\ProductI18nTableMap;
* @method array findByDescription(string $description) Return ChildProductI18n objects filtered by the description column
* @method array findByChapo(string $chapo) Return ChildProductI18n objects filtered by the chapo column
* @method array findByPostscriptum(string $postscriptum) Return ChildProductI18n objects filtered by the postscriptum column
* @method array findByMetaTitle(string $meta_title) Return ChildProductI18n objects filtered by the meta_title column
* @method array findByMetaDescription(string $meta_description) Return ChildProductI18n objects filtered by the meta_description column
* @method array findByMetaKeyword(string $meta_keyword) Return ChildProductI18n objects filtered by the meta_keyword column
*
*/
abstract class ProductI18nQuery extends ModelCriteria
@@ -147,7 +159,7 @@ abstract class ProductI18nQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM FROM product_i18n WHERE ID = :p0 AND LOCALE = :p1';
$sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM, META_TITLE, META_DESCRIPTION, META_KEYWORD FROM product_i18n WHERE ID = :p0 AND LOCALE = :p1';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
@@ -436,6 +448,93 @@ abstract class ProductI18nQuery extends ModelCriteria
return $this->addUsingAlias(ProductI18nTableMap::POSTSCRIPTUM, $postscriptum, $comparison);
}
/**
* Filter the query on the meta_title column
*
* Example usage:
* <code>
* $query->filterByMetaTitle('fooValue'); // WHERE meta_title = 'fooValue'
* $query->filterByMetaTitle('%fooValue%'); // WHERE meta_title LIKE '%fooValue%'
* </code>
*
* @param string $metaTitle 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 ChildProductI18nQuery The current query, for fluid interface
*/
public function filterByMetaTitle($metaTitle = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($metaTitle)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $metaTitle)) {
$metaTitle = str_replace('*', '%', $metaTitle);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ProductI18nTableMap::META_TITLE, $metaTitle, $comparison);
}
/**
* Filter the query on the meta_description column
*
* Example usage:
* <code>
* $query->filterByMetaDescription('fooValue'); // WHERE meta_description = 'fooValue'
* $query->filterByMetaDescription('%fooValue%'); // WHERE meta_description LIKE '%fooValue%'
* </code>
*
* @param string $metaDescription 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 ChildProductI18nQuery The current query, for fluid interface
*/
public function filterByMetaDescription($metaDescription = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($metaDescription)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $metaDescription)) {
$metaDescription = str_replace('*', '%', $metaDescription);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ProductI18nTableMap::META_DESCRIPTION, $metaDescription, $comparison);
}
/**
* Filter the query on the meta_keyword column
*
* Example usage:
* <code>
* $query->filterByMetaKeyword('fooValue'); // WHERE meta_keyword = 'fooValue'
* $query->filterByMetaKeyword('%fooValue%'); // WHERE meta_keyword LIKE '%fooValue%'
* </code>
*
* @param string $metaKeyword 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 ChildProductI18nQuery The current query, for fluid interface
*/
public function filterByMetaKeyword($metaKeyword = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($metaKeyword)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $metaKeyword)) {
$metaKeyword = str_replace('*', '%', $metaKeyword);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ProductI18nTableMap::META_KEYWORD, $metaKeyword, $comparison);
}
/**
* Filter the query by a related \Thelia\Model\Product object
*