+ * $query->filterByTextLayoutFileName('fooValue'); // WHERE text_layout_file_name = 'fooValue'
+ * $query->filterByTextLayoutFileName('%fooValue%'); // WHERE text_layout_file_name LIKE '%fooValue%'
+ *
+ *
+ * @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:
+ *
+ * $query->filterByTextTemplateFileName('fooValue'); // WHERE text_template_file_name = 'fooValue'
+ * $query->filterByTextTemplateFileName('%fooValue%'); // WHERE text_template_file_name LIKE '%fooValue%'
+ *
+ *
+ * @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:
+ *
+ * $query->filterByHtmlLayoutFileName('fooValue'); // WHERE html_layout_file_name = 'fooValue'
+ * $query->filterByHtmlLayoutFileName('%fooValue%'); // WHERE html_layout_file_name LIKE '%fooValue%'
+ *
+ *
+ * @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:
+ *
+ * $query->filterByHtmlTemplateFileName('fooValue'); // WHERE html_template_file_name = 'fooValue'
+ * $query->filterByHtmlTemplateFileName('%fooValue%'); // WHERE html_template_file_name LIKE '%fooValue%'
+ *
+ *
+ * @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
*
diff --git a/core/lib/Thelia/Model/Base/MessageVersion.php b/core/lib/Thelia/Model/Base/MessageVersion.php
index 0c58a5bb2..6fe06658c 100644
--- a/core/lib/Thelia/Model/Base/MessageVersion.php
+++ b/core/lib/Thelia/Model/Base/MessageVersion.php
@@ -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;
diff --git a/core/lib/Thelia/Model/Base/MessageVersionQuery.php b/core/lib/Thelia/Model/Base/MessageVersionQuery.php
index 088234eb5..638ed5e5c 100644
--- a/core/lib/Thelia/Model/Base/MessageVersionQuery.php
+++ b/core/lib/Thelia/Model/Base/MessageVersionQuery.php
@@ -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:
+ *
+ * $query->filterByTextLayoutFileName('fooValue'); // WHERE text_layout_file_name = 'fooValue'
+ * $query->filterByTextLayoutFileName('%fooValue%'); // WHERE text_layout_file_name LIKE '%fooValue%'
+ *
+ *
+ * @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:
+ *
+ * $query->filterByTextTemplateFileName('fooValue'); // WHERE text_template_file_name = 'fooValue'
+ * $query->filterByTextTemplateFileName('%fooValue%'); // WHERE text_template_file_name LIKE '%fooValue%'
+ *
+ *
+ * @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:
+ *
+ * $query->filterByHtmlLayoutFileName('fooValue'); // WHERE html_layout_file_name = 'fooValue'
+ * $query->filterByHtmlLayoutFileName('%fooValue%'); // WHERE html_layout_file_name LIKE '%fooValue%'
+ *
+ *
+ * @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:
+ *
+ * $query->filterByHtmlTemplateFileName('fooValue'); // WHERE html_template_file_name = 'fooValue'
+ * $query->filterByHtmlTemplateFileName('%fooValue%'); // WHERE html_template_file_name LIKE '%fooValue%'
+ *
+ *
+ * @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
*
diff --git a/core/lib/Thelia/Model/Base/Product.php b/core/lib/Thelia/Model/Base/Product.php
index 77824575c..e850d2acf 100644
--- a/core/lib/Thelia/Model/Base/Product.php
+++ b/core/lib/Thelia/Model/Base/Product.php
@@ -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
/**
diff --git a/core/lib/Thelia/Model/Base/ProductI18n.php b/core/lib/Thelia/Model/Base/ProductI18n.php
index cdab7349d..a72f07c83 100644
--- a/core/lib/Thelia/Model/Base/ProductI18n.php
+++ b/core/lib/Thelia/Model/Base/ProductI18n.php
@@ -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();
diff --git a/core/lib/Thelia/Model/Base/ProductI18nQuery.php b/core/lib/Thelia/Model/Base/ProductI18nQuery.php
index d64c95892..01d3af9d4 100644
--- a/core/lib/Thelia/Model/Base/ProductI18nQuery.php
+++ b/core/lib/Thelia/Model/Base/ProductI18nQuery.php
@@ -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:
+ *
+ * $query->filterByMetaTitle('fooValue'); // WHERE meta_title = 'fooValue'
+ * $query->filterByMetaTitle('%fooValue%'); // WHERE meta_title LIKE '%fooValue%'
+ *
+ *
+ * @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:
+ *
+ * $query->filterByMetaDescription('fooValue'); // WHERE meta_description = 'fooValue'
+ * $query->filterByMetaDescription('%fooValue%'); // WHERE meta_description LIKE '%fooValue%'
+ *
+ *
+ * @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:
+ *
+ * $query->filterByMetaKeyword('fooValue'); // WHERE meta_keyword = 'fooValue'
+ * $query->filterByMetaKeyword('%fooValue%'); // WHERE meta_keyword LIKE '%fooValue%'
+ *
+ *
+ * @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
*
diff --git a/core/lib/Thelia/Model/Map/MessageTableMap.php b/core/lib/Thelia/Model/Map/MessageTableMap.php
index d56b1210c..a81f022a0 100644
--- a/core/lib/Thelia/Model/Map/MessageTableMap.php
+++ b/core/lib/Thelia/Model/Map/MessageTableMap.php
@@ -57,7 +57,7 @@ class MessageTableMap extends TableMap
/**
* The total number of columns
*/
- const NUM_COLUMNS = 8;
+ const NUM_COLUMNS = 12;
/**
* The number of lazy-loaded columns
@@ -67,7 +67,7 @@ class MessageTableMap extends TableMap
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
- const NUM_HYDRATE_COLUMNS = 8;
+ const NUM_HYDRATE_COLUMNS = 12;
/**
* the column name for the ID field
@@ -84,6 +84,26 @@ class MessageTableMap extends TableMap
*/
const SECURED = 'message.SECURED';
+ /**
+ * the column name for the TEXT_LAYOUT_FILE_NAME field
+ */
+ const TEXT_LAYOUT_FILE_NAME = 'message.TEXT_LAYOUT_FILE_NAME';
+
+ /**
+ * the column name for the TEXT_TEMPLATE_FILE_NAME field
+ */
+ const TEXT_TEMPLATE_FILE_NAME = 'message.TEXT_TEMPLATE_FILE_NAME';
+
+ /**
+ * the column name for the HTML_LAYOUT_FILE_NAME field
+ */
+ const HTML_LAYOUT_FILE_NAME = 'message.HTML_LAYOUT_FILE_NAME';
+
+ /**
+ * the column name for the HTML_TEMPLATE_FILE_NAME field
+ */
+ const HTML_TEMPLATE_FILE_NAME = 'message.HTML_TEMPLATE_FILE_NAME';
+
/**
* the column name for the CREATED_AT field
*/
@@ -130,12 +150,12 @@ class MessageTableMap extends TableMap
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
- self::TYPE_PHPNAME => array('Id', 'Name', 'Secured', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
- self::TYPE_STUDLYPHPNAME => array('id', 'name', 'secured', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
- self::TYPE_COLNAME => array(MessageTableMap::ID, MessageTableMap::NAME, MessageTableMap::SECURED, MessageTableMap::CREATED_AT, MessageTableMap::UPDATED_AT, MessageTableMap::VERSION, MessageTableMap::VERSION_CREATED_AT, MessageTableMap::VERSION_CREATED_BY, ),
- self::TYPE_RAW_COLNAME => array('ID', 'NAME', 'SECURED', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ),
- self::TYPE_FIELDNAME => array('id', 'name', 'secured', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
+ self::TYPE_PHPNAME => array('Id', 'Name', 'Secured', 'TextLayoutFileName', 'TextTemplateFileName', 'HtmlLayoutFileName', 'HtmlTemplateFileName', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
+ self::TYPE_STUDLYPHPNAME => array('id', 'name', 'secured', 'textLayoutFileName', 'textTemplateFileName', 'htmlLayoutFileName', 'htmlTemplateFileName', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
+ self::TYPE_COLNAME => array(MessageTableMap::ID, MessageTableMap::NAME, MessageTableMap::SECURED, MessageTableMap::TEXT_LAYOUT_FILE_NAME, MessageTableMap::TEXT_TEMPLATE_FILE_NAME, MessageTableMap::HTML_LAYOUT_FILE_NAME, MessageTableMap::HTML_TEMPLATE_FILE_NAME, MessageTableMap::CREATED_AT, MessageTableMap::UPDATED_AT, MessageTableMap::VERSION, MessageTableMap::VERSION_CREATED_AT, MessageTableMap::VERSION_CREATED_BY, ),
+ self::TYPE_RAW_COLNAME => array('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', ),
+ self::TYPE_FIELDNAME => array('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', ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
);
/**
@@ -145,12 +165,12 @@ class MessageTableMap extends TableMap
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
- self::TYPE_PHPNAME => array('Id' => 0, 'Name' => 1, 'Secured' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, 'Version' => 5, 'VersionCreatedAt' => 6, 'VersionCreatedBy' => 7, ),
- self::TYPE_STUDLYPHPNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'createdAt' => 3, 'updatedAt' => 4, 'version' => 5, 'versionCreatedAt' => 6, 'versionCreatedBy' => 7, ),
- self::TYPE_COLNAME => array(MessageTableMap::ID => 0, MessageTableMap::NAME => 1, MessageTableMap::SECURED => 2, MessageTableMap::CREATED_AT => 3, MessageTableMap::UPDATED_AT => 4, MessageTableMap::VERSION => 5, MessageTableMap::VERSION_CREATED_AT => 6, MessageTableMap::VERSION_CREATED_BY => 7, ),
- self::TYPE_RAW_COLNAME => array('ID' => 0, 'NAME' => 1, 'SECURED' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, 'VERSION' => 5, 'VERSION_CREATED_AT' => 6, 'VERSION_CREATED_BY' => 7, ),
- self::TYPE_FIELDNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'created_at' => 3, 'updated_at' => 4, 'version' => 5, 'version_created_at' => 6, 'version_created_by' => 7, ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
+ self::TYPE_PHPNAME => array('Id' => 0, 'Name' => 1, 'Secured' => 2, 'TextLayoutFileName' => 3, 'TextTemplateFileName' => 4, 'HtmlLayoutFileName' => 5, 'HtmlTemplateFileName' => 6, 'CreatedAt' => 7, 'UpdatedAt' => 8, 'Version' => 9, 'VersionCreatedAt' => 10, 'VersionCreatedBy' => 11, ),
+ self::TYPE_STUDLYPHPNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'textLayoutFileName' => 3, 'textTemplateFileName' => 4, 'htmlLayoutFileName' => 5, 'htmlTemplateFileName' => 6, 'createdAt' => 7, 'updatedAt' => 8, 'version' => 9, 'versionCreatedAt' => 10, 'versionCreatedBy' => 11, ),
+ self::TYPE_COLNAME => array(MessageTableMap::ID => 0, MessageTableMap::NAME => 1, MessageTableMap::SECURED => 2, MessageTableMap::TEXT_LAYOUT_FILE_NAME => 3, MessageTableMap::TEXT_TEMPLATE_FILE_NAME => 4, MessageTableMap::HTML_LAYOUT_FILE_NAME => 5, MessageTableMap::HTML_TEMPLATE_FILE_NAME => 6, MessageTableMap::CREATED_AT => 7, MessageTableMap::UPDATED_AT => 8, MessageTableMap::VERSION => 9, MessageTableMap::VERSION_CREATED_AT => 10, MessageTableMap::VERSION_CREATED_BY => 11, ),
+ self::TYPE_RAW_COLNAME => array('ID' => 0, 'NAME' => 1, 'SECURED' => 2, 'TEXT_LAYOUT_FILE_NAME' => 3, 'TEXT_TEMPLATE_FILE_NAME' => 4, 'HTML_LAYOUT_FILE_NAME' => 5, 'HTML_TEMPLATE_FILE_NAME' => 6, 'CREATED_AT' => 7, 'UPDATED_AT' => 8, 'VERSION' => 9, 'VERSION_CREATED_AT' => 10, 'VERSION_CREATED_BY' => 11, ),
+ self::TYPE_FIELDNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'text_layout_file_name' => 3, 'text_template_file_name' => 4, 'html_layout_file_name' => 5, 'html_template_file_name' => 6, 'created_at' => 7, 'updated_at' => 8, 'version' => 9, 'version_created_at' => 10, 'version_created_by' => 11, ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
);
/**
@@ -172,6 +192,10 @@ class MessageTableMap extends TableMap
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('NAME', 'Name', 'VARCHAR', true, 255, null);
$this->addColumn('SECURED', 'Secured', 'TINYINT', false, null, null);
+ $this->addColumn('TEXT_LAYOUT_FILE_NAME', 'TextLayoutFileName', 'VARCHAR', false, 255, null);
+ $this->addColumn('TEXT_TEMPLATE_FILE_NAME', 'TextTemplateFileName', 'VARCHAR', false, 255, null);
+ $this->addColumn('HTML_LAYOUT_FILE_NAME', 'HtmlLayoutFileName', 'VARCHAR', false, 255, null);
+ $this->addColumn('HTML_TEMPLATE_FILE_NAME', 'HtmlTemplateFileName', 'VARCHAR', false, 255, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION', 'Version', 'INTEGER', false, null, 0);
@@ -354,6 +378,10 @@ class MessageTableMap extends TableMap
$criteria->addSelectColumn(MessageTableMap::ID);
$criteria->addSelectColumn(MessageTableMap::NAME);
$criteria->addSelectColumn(MessageTableMap::SECURED);
+ $criteria->addSelectColumn(MessageTableMap::TEXT_LAYOUT_FILE_NAME);
+ $criteria->addSelectColumn(MessageTableMap::TEXT_TEMPLATE_FILE_NAME);
+ $criteria->addSelectColumn(MessageTableMap::HTML_LAYOUT_FILE_NAME);
+ $criteria->addSelectColumn(MessageTableMap::HTML_TEMPLATE_FILE_NAME);
$criteria->addSelectColumn(MessageTableMap::CREATED_AT);
$criteria->addSelectColumn(MessageTableMap::UPDATED_AT);
$criteria->addSelectColumn(MessageTableMap::VERSION);
@@ -363,6 +391,10 @@ class MessageTableMap extends TableMap
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.NAME');
$criteria->addSelectColumn($alias . '.SECURED');
+ $criteria->addSelectColumn($alias . '.TEXT_LAYOUT_FILE_NAME');
+ $criteria->addSelectColumn($alias . '.TEXT_TEMPLATE_FILE_NAME');
+ $criteria->addSelectColumn($alias . '.HTML_LAYOUT_FILE_NAME');
+ $criteria->addSelectColumn($alias . '.HTML_TEMPLATE_FILE_NAME');
$criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT');
$criteria->addSelectColumn($alias . '.VERSION');
diff --git a/core/lib/Thelia/Model/Map/MessageVersionTableMap.php b/core/lib/Thelia/Model/Map/MessageVersionTableMap.php
index db043cdc5..c4b72d126 100644
--- a/core/lib/Thelia/Model/Map/MessageVersionTableMap.php
+++ b/core/lib/Thelia/Model/Map/MessageVersionTableMap.php
@@ -57,7 +57,7 @@ class MessageVersionTableMap extends TableMap
/**
* The total number of columns
*/
- const NUM_COLUMNS = 8;
+ const NUM_COLUMNS = 12;
/**
* The number of lazy-loaded columns
@@ -67,7 +67,7 @@ class MessageVersionTableMap extends TableMap
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
- const NUM_HYDRATE_COLUMNS = 8;
+ const NUM_HYDRATE_COLUMNS = 12;
/**
* the column name for the ID field
@@ -84,6 +84,26 @@ class MessageVersionTableMap extends TableMap
*/
const SECURED = 'message_version.SECURED';
+ /**
+ * the column name for the TEXT_LAYOUT_FILE_NAME field
+ */
+ const TEXT_LAYOUT_FILE_NAME = 'message_version.TEXT_LAYOUT_FILE_NAME';
+
+ /**
+ * the column name for the TEXT_TEMPLATE_FILE_NAME field
+ */
+ const TEXT_TEMPLATE_FILE_NAME = 'message_version.TEXT_TEMPLATE_FILE_NAME';
+
+ /**
+ * the column name for the HTML_LAYOUT_FILE_NAME field
+ */
+ const HTML_LAYOUT_FILE_NAME = 'message_version.HTML_LAYOUT_FILE_NAME';
+
+ /**
+ * the column name for the HTML_TEMPLATE_FILE_NAME field
+ */
+ const HTML_TEMPLATE_FILE_NAME = 'message_version.HTML_TEMPLATE_FILE_NAME';
+
/**
* the column name for the CREATED_AT field
*/
@@ -121,12 +141,12 @@ class MessageVersionTableMap extends TableMap
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
- self::TYPE_PHPNAME => array('Id', 'Name', 'Secured', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
- self::TYPE_STUDLYPHPNAME => array('id', 'name', 'secured', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
- self::TYPE_COLNAME => array(MessageVersionTableMap::ID, MessageVersionTableMap::NAME, MessageVersionTableMap::SECURED, MessageVersionTableMap::CREATED_AT, MessageVersionTableMap::UPDATED_AT, MessageVersionTableMap::VERSION, MessageVersionTableMap::VERSION_CREATED_AT, MessageVersionTableMap::VERSION_CREATED_BY, ),
- self::TYPE_RAW_COLNAME => array('ID', 'NAME', 'SECURED', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ),
- self::TYPE_FIELDNAME => array('id', 'name', 'secured', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
+ self::TYPE_PHPNAME => array('Id', 'Name', 'Secured', 'TextLayoutFileName', 'TextTemplateFileName', 'HtmlLayoutFileName', 'HtmlTemplateFileName', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
+ self::TYPE_STUDLYPHPNAME => array('id', 'name', 'secured', 'textLayoutFileName', 'textTemplateFileName', 'htmlLayoutFileName', 'htmlTemplateFileName', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
+ self::TYPE_COLNAME => array(MessageVersionTableMap::ID, MessageVersionTableMap::NAME, MessageVersionTableMap::SECURED, MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME, MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME, MessageVersionTableMap::HTML_LAYOUT_FILE_NAME, MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME, MessageVersionTableMap::CREATED_AT, MessageVersionTableMap::UPDATED_AT, MessageVersionTableMap::VERSION, MessageVersionTableMap::VERSION_CREATED_AT, MessageVersionTableMap::VERSION_CREATED_BY, ),
+ self::TYPE_RAW_COLNAME => array('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', ),
+ self::TYPE_FIELDNAME => array('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', ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
);
/**
@@ -136,12 +156,12 @@ class MessageVersionTableMap extends TableMap
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
- self::TYPE_PHPNAME => array('Id' => 0, 'Name' => 1, 'Secured' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, 'Version' => 5, 'VersionCreatedAt' => 6, 'VersionCreatedBy' => 7, ),
- self::TYPE_STUDLYPHPNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'createdAt' => 3, 'updatedAt' => 4, 'version' => 5, 'versionCreatedAt' => 6, 'versionCreatedBy' => 7, ),
- self::TYPE_COLNAME => array(MessageVersionTableMap::ID => 0, MessageVersionTableMap::NAME => 1, MessageVersionTableMap::SECURED => 2, MessageVersionTableMap::CREATED_AT => 3, MessageVersionTableMap::UPDATED_AT => 4, MessageVersionTableMap::VERSION => 5, MessageVersionTableMap::VERSION_CREATED_AT => 6, MessageVersionTableMap::VERSION_CREATED_BY => 7, ),
- self::TYPE_RAW_COLNAME => array('ID' => 0, 'NAME' => 1, 'SECURED' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, 'VERSION' => 5, 'VERSION_CREATED_AT' => 6, 'VERSION_CREATED_BY' => 7, ),
- self::TYPE_FIELDNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'created_at' => 3, 'updated_at' => 4, 'version' => 5, 'version_created_at' => 6, 'version_created_by' => 7, ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
+ self::TYPE_PHPNAME => array('Id' => 0, 'Name' => 1, 'Secured' => 2, 'TextLayoutFileName' => 3, 'TextTemplateFileName' => 4, 'HtmlLayoutFileName' => 5, 'HtmlTemplateFileName' => 6, 'CreatedAt' => 7, 'UpdatedAt' => 8, 'Version' => 9, 'VersionCreatedAt' => 10, 'VersionCreatedBy' => 11, ),
+ self::TYPE_STUDLYPHPNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'textLayoutFileName' => 3, 'textTemplateFileName' => 4, 'htmlLayoutFileName' => 5, 'htmlTemplateFileName' => 6, 'createdAt' => 7, 'updatedAt' => 8, 'version' => 9, 'versionCreatedAt' => 10, 'versionCreatedBy' => 11, ),
+ self::TYPE_COLNAME => array(MessageVersionTableMap::ID => 0, MessageVersionTableMap::NAME => 1, MessageVersionTableMap::SECURED => 2, MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME => 3, MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME => 4, MessageVersionTableMap::HTML_LAYOUT_FILE_NAME => 5, MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME => 6, MessageVersionTableMap::CREATED_AT => 7, MessageVersionTableMap::UPDATED_AT => 8, MessageVersionTableMap::VERSION => 9, MessageVersionTableMap::VERSION_CREATED_AT => 10, MessageVersionTableMap::VERSION_CREATED_BY => 11, ),
+ self::TYPE_RAW_COLNAME => array('ID' => 0, 'NAME' => 1, 'SECURED' => 2, 'TEXT_LAYOUT_FILE_NAME' => 3, 'TEXT_TEMPLATE_FILE_NAME' => 4, 'HTML_LAYOUT_FILE_NAME' => 5, 'HTML_TEMPLATE_FILE_NAME' => 6, 'CREATED_AT' => 7, 'UPDATED_AT' => 8, 'VERSION' => 9, 'VERSION_CREATED_AT' => 10, 'VERSION_CREATED_BY' => 11, ),
+ self::TYPE_FIELDNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'text_layout_file_name' => 3, 'text_template_file_name' => 4, 'html_layout_file_name' => 5, 'html_template_file_name' => 6, 'created_at' => 7, 'updated_at' => 8, 'version' => 9, 'version_created_at' => 10, 'version_created_by' => 11, ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
);
/**
@@ -163,6 +183,10 @@ class MessageVersionTableMap extends TableMap
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'message', 'ID', true, null, null);
$this->addColumn('NAME', 'Name', 'VARCHAR', true, 255, null);
$this->addColumn('SECURED', 'Secured', 'TINYINT', false, null, null);
+ $this->addColumn('TEXT_LAYOUT_FILE_NAME', 'TextLayoutFileName', 'VARCHAR', false, 255, null);
+ $this->addColumn('TEXT_TEMPLATE_FILE_NAME', 'TextTemplateFileName', 'VARCHAR', false, 255, null);
+ $this->addColumn('HTML_LAYOUT_FILE_NAME', 'HtmlLayoutFileName', 'VARCHAR', false, 255, null);
+ $this->addColumn('HTML_TEMPLATE_FILE_NAME', 'HtmlTemplateFileName', 'VARCHAR', false, 255, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('VERSION', 'Version', 'INTEGER', true, null, 0);
@@ -245,11 +269,11 @@ class MessageVersionTableMap extends TableMap
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
{
// If the PK cannot be derived from the row, return NULL.
- if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 5 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)] === null) {
+ if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 9 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)] === null) {
return null;
}
- return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 5 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]));
+ return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 9 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]));
}
/**
@@ -368,6 +392,10 @@ class MessageVersionTableMap extends TableMap
$criteria->addSelectColumn(MessageVersionTableMap::ID);
$criteria->addSelectColumn(MessageVersionTableMap::NAME);
$criteria->addSelectColumn(MessageVersionTableMap::SECURED);
+ $criteria->addSelectColumn(MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME);
+ $criteria->addSelectColumn(MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME);
+ $criteria->addSelectColumn(MessageVersionTableMap::HTML_LAYOUT_FILE_NAME);
+ $criteria->addSelectColumn(MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME);
$criteria->addSelectColumn(MessageVersionTableMap::CREATED_AT);
$criteria->addSelectColumn(MessageVersionTableMap::UPDATED_AT);
$criteria->addSelectColumn(MessageVersionTableMap::VERSION);
@@ -377,6 +405,10 @@ class MessageVersionTableMap extends TableMap
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.NAME');
$criteria->addSelectColumn($alias . '.SECURED');
+ $criteria->addSelectColumn($alias . '.TEXT_LAYOUT_FILE_NAME');
+ $criteria->addSelectColumn($alias . '.TEXT_TEMPLATE_FILE_NAME');
+ $criteria->addSelectColumn($alias . '.HTML_LAYOUT_FILE_NAME');
+ $criteria->addSelectColumn($alias . '.HTML_TEMPLATE_FILE_NAME');
$criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT');
$criteria->addSelectColumn($alias . '.VERSION');
diff --git a/core/lib/Thelia/Model/Map/ProductI18nTableMap.php b/core/lib/Thelia/Model/Map/ProductI18nTableMap.php
index 79a01514a..e082ebccb 100644
--- a/core/lib/Thelia/Model/Map/ProductI18nTableMap.php
+++ b/core/lib/Thelia/Model/Map/ProductI18nTableMap.php
@@ -57,7 +57,7 @@ class ProductI18nTableMap extends TableMap
/**
* The total number of columns
*/
- const NUM_COLUMNS = 6;
+ const NUM_COLUMNS = 9;
/**
* The number of lazy-loaded columns
@@ -67,7 +67,7 @@ class ProductI18nTableMap extends TableMap
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
- const NUM_HYDRATE_COLUMNS = 6;
+ const NUM_HYDRATE_COLUMNS = 9;
/**
* the column name for the ID field
@@ -99,6 +99,21 @@ class ProductI18nTableMap extends TableMap
*/
const POSTSCRIPTUM = 'product_i18n.POSTSCRIPTUM';
+ /**
+ * the column name for the META_TITLE field
+ */
+ const META_TITLE = 'product_i18n.META_TITLE';
+
+ /**
+ * the column name for the META_DESCRIPTION field
+ */
+ const META_DESCRIPTION = 'product_i18n.META_DESCRIPTION';
+
+ /**
+ * the column name for the META_KEYWORD field
+ */
+ const META_KEYWORD = 'product_i18n.META_KEYWORD';
+
/**
* The default string format for model objects of the related table
*/
@@ -111,12 +126,12 @@ class ProductI18nTableMap extends TableMap
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
- self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', 'Description', 'Chapo', 'Postscriptum', ),
- self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', ),
- self::TYPE_COLNAME => array(ProductI18nTableMap::ID, ProductI18nTableMap::LOCALE, ProductI18nTableMap::TITLE, ProductI18nTableMap::DESCRIPTION, ProductI18nTableMap::CHAPO, ProductI18nTableMap::POSTSCRIPTUM, ),
- self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', 'CHAPO', 'POSTSCRIPTUM', ),
- self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
+ self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', 'Description', 'Chapo', 'Postscriptum', 'MetaTitle', 'MetaDescription', 'MetaKeyword', ),
+ self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', 'metaTitle', 'metaDescription', 'metaKeyword', ),
+ self::TYPE_COLNAME => array(ProductI18nTableMap::ID, ProductI18nTableMap::LOCALE, ProductI18nTableMap::TITLE, ProductI18nTableMap::DESCRIPTION, ProductI18nTableMap::CHAPO, ProductI18nTableMap::POSTSCRIPTUM, ProductI18nTableMap::META_TITLE, ProductI18nTableMap::META_DESCRIPTION, ProductI18nTableMap::META_KEYWORD, ),
+ self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', 'CHAPO', 'POSTSCRIPTUM', 'META_TITLE', 'META_DESCRIPTION', 'META_KEYWORD', ),
+ self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', 'meta_title', 'meta_description', 'meta_keyword', ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
);
/**
@@ -126,12 +141,12 @@ class ProductI18nTableMap extends TableMap
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
- self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Description' => 3, 'Chapo' => 4, 'Postscriptum' => 5, ),
- self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, ),
- self::TYPE_COLNAME => array(ProductI18nTableMap::ID => 0, ProductI18nTableMap::LOCALE => 1, ProductI18nTableMap::TITLE => 2, ProductI18nTableMap::DESCRIPTION => 3, ProductI18nTableMap::CHAPO => 4, ProductI18nTableMap::POSTSCRIPTUM => 5, ),
- self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'DESCRIPTION' => 3, 'CHAPO' => 4, 'POSTSCRIPTUM' => 5, ),
- self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
+ self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Description' => 3, 'Chapo' => 4, 'Postscriptum' => 5, 'MetaTitle' => 6, 'MetaDescription' => 7, 'MetaKeyword' => 8, ),
+ self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, 'metaTitle' => 6, 'metaDescription' => 7, 'metaKeyword' => 8, ),
+ self::TYPE_COLNAME => array(ProductI18nTableMap::ID => 0, ProductI18nTableMap::LOCALE => 1, ProductI18nTableMap::TITLE => 2, ProductI18nTableMap::DESCRIPTION => 3, ProductI18nTableMap::CHAPO => 4, ProductI18nTableMap::POSTSCRIPTUM => 5, ProductI18nTableMap::META_TITLE => 6, ProductI18nTableMap::META_DESCRIPTION => 7, ProductI18nTableMap::META_KEYWORD => 8, ),
+ self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'DESCRIPTION' => 3, 'CHAPO' => 4, 'POSTSCRIPTUM' => 5, 'META_TITLE' => 6, 'META_DESCRIPTION' => 7, 'META_KEYWORD' => 8, ),
+ self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, 'meta_title' => 6, 'meta_description' => 7, 'meta_keyword' => 8, ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
);
/**
@@ -156,6 +171,9 @@ class ProductI18nTableMap extends TableMap
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
+ $this->addColumn('META_TITLE', 'MetaTitle', 'VARCHAR', false, 255, null);
+ $this->addColumn('META_DESCRIPTION', 'MetaDescription', 'LONGVARCHAR', false, null, null);
+ $this->addColumn('META_KEYWORD', 'MetaKeyword', 'LONGVARCHAR', false, null, null);
} // initialize()
/**
@@ -359,6 +377,9 @@ class ProductI18nTableMap extends TableMap
$criteria->addSelectColumn(ProductI18nTableMap::DESCRIPTION);
$criteria->addSelectColumn(ProductI18nTableMap::CHAPO);
$criteria->addSelectColumn(ProductI18nTableMap::POSTSCRIPTUM);
+ $criteria->addSelectColumn(ProductI18nTableMap::META_TITLE);
+ $criteria->addSelectColumn(ProductI18nTableMap::META_DESCRIPTION);
+ $criteria->addSelectColumn(ProductI18nTableMap::META_KEYWORD);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.LOCALE');
@@ -366,6 +387,9 @@ class ProductI18nTableMap extends TableMap
$criteria->addSelectColumn($alias . '.DESCRIPTION');
$criteria->addSelectColumn($alias . '.CHAPO');
$criteria->addSelectColumn($alias . '.POSTSCRIPTUM');
+ $criteria->addSelectColumn($alias . '.META_TITLE');
+ $criteria->addSelectColumn($alias . '.META_DESCRIPTION');
+ $criteria->addSelectColumn($alias . '.META_KEYWORD');
}
}
diff --git a/core/lib/Thelia/Model/Map/ProductTableMap.php b/core/lib/Thelia/Model/Map/ProductTableMap.php
index 68a34a393..3cf8d3925 100644
--- a/core/lib/Thelia/Model/Map/ProductTableMap.php
+++ b/core/lib/Thelia/Model/Map/ProductTableMap.php
@@ -230,7 +230,7 @@ class ProductTableMap extends TableMap
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
- 'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
+ 'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum, meta_title, meta_description, meta_keyword', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
'versionable' => array('version_column' => 'version', 'version_table' => '', 'log_created_at' => 'true', 'log_created_by' => 'true', 'log_comment' => 'false', 'version_created_at_column' => 'version_created_at', 'version_created_by_column' => 'version_created_by', 'version_comment_column' => 'version_comment', ),
);
} // getBehaviors()
diff --git a/core/lib/Thelia/Model/Message.php b/core/lib/Thelia/Model/Message.php
index 4163e6d6b..190ceff03 100755
--- a/core/lib/Thelia/Model/Message.php
+++ b/core/lib/Thelia/Model/Message.php
@@ -6,6 +6,8 @@ use Thelia\Model\Base\Message as BaseMessage;
use Propel\Runtime\Connection\ConnectionInterface;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Event\Message\MessageEvent;
+use Thelia\Core\Template\ParserInterface;
+use Thelia\Core\Template\TemplateHelper;
class Message extends BaseMessage {
@@ -64,4 +66,97 @@ class Message extends BaseMessage {
{
$this->dispatchEvent(TheliaEvents::AFTER_DELETEMESSAGE, new MessageEvent($this));
}
-}
+
+ /**
+ * Calculate the message body, given the HTML entered in the back-office, the message layout, and the message template
+ */
+ protected function getMessageBody($parser, $message, $layout, $template) {
+
+ $body = false;
+
+ $mail_template_path = TemplateHelper::getInstance()->getActiveMailTemplate()->getAbsolutePath() . DS;
+
+ // Try to get the body from template file, if a file is defined
+ if (! empty($template)) {
+ try {
+
+ $body = $parser->render($mail_template_path . $template);
+ } catch (ResourceNotFoundException $ex) {
+ // Ignore this.
+ }
+ }
+
+ // We did not get it ? Use the message entered in the back-office
+ if ($body === false) {
+ $body = $parser->renderString($message);
+ }
+
+ // Do we have a layout ?
+ if (! empty($layout)) {
+
+ // Populate the message body variable
+ $parser->assign('message_body', $body);
+
+ // Render the layout file
+ $body = $parser->render($mail_template_path . $layout);
+ }
+
+ return $body;
+ }
+
+ /**
+ * Get the HTML message body
+ */
+ public function getHtmlMessageBody(ParserInterface $parser) {
+
+ return $this->getMessageBody(
+ $parser,
+ $this->getHtmlMessage(),
+ $this->getHtmlLayoutFileName(),
+ $this->getHtmlTemplateFileName()
+ );
+ }
+
+ /**
+ * Get the TEXT message body
+ */
+ public function getTextMessageBody(ParserInterface $parser) {
+
+ return $this->getMessageBody(
+ $parser,
+ $this->getTextMessage(),
+ $this->getTextLayoutFileName(),
+ $this->getTextTemplateFileName()
+ );
+ }
+
+ /**
+ * Add a subject and a body (TEXT, HTML or both, depending on the message
+ * configuration.
+ */
+ public function buildMessage($parser, \Swift_Message $messageInstance) {
+
+ $subject = $parser->fetch(sprintf("string:%s", $this->getSubject()));
+ $htmlMessage = $this->getHtmlMessageBody($parser);
+ $textMessage = $this->getTextMessageBody($parser);
+
+ $messageInstance->setSubject($subject);
+
+ // If we do not have an HTML message
+ if (empty($htmlMessage)) {
+ // Message body is the text message
+ $messageInstance->setBody($textMessage, 'text/plain');
+ }
+ else {
+ // The main body is the HTML messahe
+ $messageInstance->setBody($htmlMessage, 'text/html');
+
+ // Use the text as a message part, if we have one.
+ if (! empty($textMessage)) {
+ $messageInstance->addPart($textMessage, 'text/plain');
+ }
+ }
+
+ return $messageInstance;
+ }
+}
\ No newline at end of file
diff --git a/core/lib/Thelia/Model/Module.php b/core/lib/Thelia/Model/Module.php
index b2518169d..3d45746cc 100755
--- a/core/lib/Thelia/Model/Module.php
+++ b/core/lib/Thelia/Model/Module.php
@@ -22,6 +22,13 @@ class Module extends BaseModule
return ucfirst($this->getCode());
}
+ /**
+ * @return the module's base directory path, relative to THELIA_MODULE_DIR
+ */
+ public function getAbsoluteBaseDir() {
+ return THELIA_MODULE_DIR . $this->getBaseDir();
+ }
+
/**
* @return the module's config directory path, relative to THELIA_MODULE_DIR
*/
@@ -29,10 +36,24 @@ class Module extends BaseModule
return $this->getBaseDir() . DS . "Config";
}
+ /**
+ * @return the module's config absolute directory path
+ */
+ public function getAbsoluteConfigPath() {
+ return THELIA_MODULE_DIR . $this->getConfigPath();
+ }
+
/**
* @return the module's i18N directory path, relative to THELIA_MODULE_DIR
*/
public function getI18nPath() {
return $this->getBaseDir() . DS . "I18n";
}
-}
+
+ /**
+ * @return the module's i18N absolute directory path
+ */
+ public function getAbsoluteI18nPath() {
+ return THELIA_MODULE_DIR . $this->getI18nPath();
+ }
+}
\ No newline at end of file
diff --git a/core/lib/Thelia/Tests/Model/Message.php b/core/lib/Thelia/Tests/Model/Message.php
new file mode 100644
index 000000000..1b7cd5716
--- /dev/null
+++ b/core/lib/Thelia/Tests/Model/Message.php
@@ -0,0 +1,337 @@
+. */
+/* */
+/*************************************************************************************/
+
+namespace Thelia\Tests\Model;
+
+
+use Thelia\Model\ConfigQuery;
+use Symfony\Component\Filesystem\Filesystem;
+use Thelia\Model\Message;
+use Thelia\Core\Template\Smarty\SmartyParser;
+use Thelia\Core\Template\ParserContext;
+use Thelia\Core\Template\TemplateHelper;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
+use Thelia\Core\HttpFoundation\Request;
+use Thelia\Core\HttpFoundation\Session\Session;
+
+/**
+ * Class CustomerTest
+ * @package Thelia\Tests\Action
+ * @author Etienne Roudeix {intl l='Message created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}}
+{intl l='Message created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}
| Référence | +Désignation | +P.U. € | +Qté | +
|---|---|---|---|
| {$REF} | +{$TITLE}
+ {ifloop rel="combinations"}
+ {loop type="order_product_attribute_combination" name="combinations" order_product=$ID}
+ {$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE} + {/loop} + {/ifloop} + |
+ {$orderCurrency} {$realTaxedPrice} | +{$QUANTITY} | +
| + | |||
| Montant total avant remise € | +{$orderCurrency} {$TOTAL_TAXED_AMOUNT - $POSTAGE} | +||
| Port € | +{$orderCurrency} {$POSTAGE} | +||
| Montant total de la commande € | +{$orderCurrency} {$TOTAL_TAXED_AMOUNT} | +||
LIVRAISON : {loop name="delivery-module" type="module" id=$DELIVERY_MODULE}{$TITLE}{/loop}
+ {loop type="order_address" name="delivery_address" id=$INVOICE_ADDRESS} +N° de client : {$customer_ref}
+Nom : + {loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop} {$FIRSTNAME} {$LASTNAME}
+N° et rue : + {$ADDRESS1}
+Complément : {$ADDRESS2} + {$ADDRESS3}
+Code postal : {$ZIPCODE}
+Ville : {$CITY}
+Pays : {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}
+FACTURATION : paiement par {loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}
+ {loop type="order_address" name="delivery_address" id=$DELIVERY_ADDRESS} +N° de client : {$customer_ref}
+Nom : + {loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop} {$FIRSTNAME} {$LASTNAME}
+N° et rue : + {$ADDRESS1}
+Complément : {$ADDRESS2} + {$ADDRESS3}
+Code postal : {$ZIPCODE}
+Ville : {$CITY}
+Pays : {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}
+Le suivi de votre commande est disponible dans la rubrique mon compte sur {config key="url_site"}
+