Merge branch 'master' of https://github.com/thelia/thelia into coupon
* 'master' of https://github.com/thelia/thelia: (121 commits) set cartItem in cart add and update events need to unescape breadcrumb strings after been in array update readme file update insert.sql with new release version change changelog file format Prevent product and content création at catalog root dynamic delivery modules on delivery front template complete changelog Finished merging modules with master Revert "Merge branch 'cleanmaster' into modules" use TaxEngine::getDeliveryCountry in delivery loop refacto getTaxCountry which is actually getDeliveryCountry make it magic last stand change loop in shipping zone template using module insteadof delivery Fixed template loop Refactored templates processing complete readme file change email address of core contributors fix getPosition folder test add coupon tests ... Conflicts: core/lib/Thelia/Controller/Admin/ProductController.php
This commit is contained in:
@@ -18,7 +18,7 @@ class AdminLog extends BaseAdminLog
|
||||
* @param Request $request
|
||||
* @param Base\Admin $adminUser
|
||||
*/
|
||||
public static function append($resource, $action, $message, Request $request, BaseAdminUser $adminUser = null) {
|
||||
public static function append($resource, $action, $message, Request $request, BaseAdminUser $adminUser = null, $withRequestContent = true) {
|
||||
|
||||
$log = new AdminLog();
|
||||
|
||||
@@ -29,7 +29,7 @@ class AdminLog extends BaseAdminLog
|
||||
->setResource($resource)
|
||||
->setAction($action)
|
||||
->setMessage($message)
|
||||
->setRequest($request->__toString())
|
||||
->setRequest($request->toString($withRequestContent))
|
||||
;
|
||||
|
||||
try {
|
||||
|
||||
@@ -3651,6 +3651,78 @@ abstract class Category 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\CategoryI18n 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\CategoryI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setMetaDescription($v)
|
||||
{ $this->getCurrentTranslation()->setMetaDescription($v);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the [meta_keywords] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMetaKeywords()
|
||||
{
|
||||
return $this->getCurrentTranslation()->getMetaKeywords();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the value of [meta_keywords] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CategoryI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setMetaKeywords($v)
|
||||
{ $this->getCurrentTranslation()->setMetaKeywords($v);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
// versionable behavior
|
||||
|
||||
/**
|
||||
|
||||
@@ -90,6 +90,24 @@ abstract class CategoryI18n 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_keywords field.
|
||||
* @var string
|
||||
*/
|
||||
protected $meta_keywords;
|
||||
|
||||
/**
|
||||
* @var Category
|
||||
*/
|
||||
@@ -440,6 +458,39 @@ abstract class CategoryI18n 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_keywords] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMetaKeywords()
|
||||
{
|
||||
|
||||
return $this->meta_keywords;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [id] column.
|
||||
*
|
||||
@@ -570,6 +621,69 @@ abstract class CategoryI18n implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setPostscriptum()
|
||||
|
||||
/**
|
||||
* Set the value of [meta_title] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CategoryI18n 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[] = CategoryI18nTableMap::META_TITLE;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setMetaTitle()
|
||||
|
||||
/**
|
||||
* Set the value of [meta_description] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CategoryI18n 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[] = CategoryI18nTableMap::META_DESCRIPTION;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setMetaDescription()
|
||||
|
||||
/**
|
||||
* Set the value of [meta_keywords] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CategoryI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setMetaKeywords($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->meta_keywords !== $v) {
|
||||
$this->meta_keywords = $v;
|
||||
$this->modifiedColumns[] = CategoryI18nTableMap::META_KEYWORDS;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setMetaKeywords()
|
||||
|
||||
/**
|
||||
* Indicates whether the columns in this object are only set to default values.
|
||||
*
|
||||
@@ -628,6 +742,15 @@ abstract class CategoryI18n implements ActiveRecordInterface
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CategoryI18nTableMap::translateFieldName('Postscriptum', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->postscriptum = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CategoryI18nTableMap::translateFieldName('MetaTitle', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->meta_title = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CategoryI18nTableMap::translateFieldName('MetaDescription', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->meta_description = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CategoryI18nTableMap::translateFieldName('MetaKeywords', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->meta_keywords = (null !== $col) ? (string) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
@@ -636,7 +759,7 @@ abstract class CategoryI18n implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 6; // 6 = CategoryI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 9; // 9 = CategoryI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\CategoryI18n object", 0, $e);
|
||||
@@ -875,6 +998,15 @@ abstract class CategoryI18n implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CategoryI18nTableMap::POSTSCRIPTUM)) {
|
||||
$modifiedColumns[':p' . $index++] = 'POSTSCRIPTUM';
|
||||
}
|
||||
if ($this->isColumnModified(CategoryI18nTableMap::META_TITLE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'META_TITLE';
|
||||
}
|
||||
if ($this->isColumnModified(CategoryI18nTableMap::META_DESCRIPTION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'META_DESCRIPTION';
|
||||
}
|
||||
if ($this->isColumnModified(CategoryI18nTableMap::META_KEYWORDS)) {
|
||||
$modifiedColumns[':p' . $index++] = 'META_KEYWORDS';
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
'INSERT INTO category_i18n (%s) VALUES (%s)',
|
||||
@@ -904,6 +1036,15 @@ abstract class CategoryI18n 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_KEYWORDS':
|
||||
$stmt->bindValue($identifier, $this->meta_keywords, PDO::PARAM_STR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
$stmt->execute();
|
||||
@@ -977,6 +1118,15 @@ abstract class CategoryI18n implements ActiveRecordInterface
|
||||
case 5:
|
||||
return $this->getPostscriptum();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getMetaTitle();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getMetaDescription();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getMetaKeywords();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
@@ -1012,6 +1162,9 @@ abstract class CategoryI18n 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->getMetaKeywords(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||
@@ -1074,6 +1227,15 @@ abstract class CategoryI18n implements ActiveRecordInterface
|
||||
case 5:
|
||||
$this->setPostscriptum($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setMetaTitle($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setMetaDescription($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setMetaKeywords($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
@@ -1104,6 +1266,9 @@ abstract class CategoryI18n 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->setMetaKeywords($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1121,6 +1286,9 @@ abstract class CategoryI18n implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CategoryI18nTableMap::DESCRIPTION)) $criteria->add(CategoryI18nTableMap::DESCRIPTION, $this->description);
|
||||
if ($this->isColumnModified(CategoryI18nTableMap::CHAPO)) $criteria->add(CategoryI18nTableMap::CHAPO, $this->chapo);
|
||||
if ($this->isColumnModified(CategoryI18nTableMap::POSTSCRIPTUM)) $criteria->add(CategoryI18nTableMap::POSTSCRIPTUM, $this->postscriptum);
|
||||
if ($this->isColumnModified(CategoryI18nTableMap::META_TITLE)) $criteria->add(CategoryI18nTableMap::META_TITLE, $this->meta_title);
|
||||
if ($this->isColumnModified(CategoryI18nTableMap::META_DESCRIPTION)) $criteria->add(CategoryI18nTableMap::META_DESCRIPTION, $this->meta_description);
|
||||
if ($this->isColumnModified(CategoryI18nTableMap::META_KEYWORDS)) $criteria->add(CategoryI18nTableMap::META_KEYWORDS, $this->meta_keywords);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -1197,6 +1365,9 @@ abstract class CategoryI18n implements ActiveRecordInterface
|
||||
$copyObj->setDescription($this->getDescription());
|
||||
$copyObj->setChapo($this->getChapo());
|
||||
$copyObj->setPostscriptum($this->getPostscriptum());
|
||||
$copyObj->setMetaTitle($this->getMetaTitle());
|
||||
$copyObj->setMetaDescription($this->getMetaDescription());
|
||||
$copyObj->setMetaKeywords($this->getMetaKeywords());
|
||||
if ($makeNew) {
|
||||
$copyObj->setNew(true);
|
||||
}
|
||||
@@ -1286,6 +1457,9 @@ abstract class CategoryI18n implements ActiveRecordInterface
|
||||
$this->description = null;
|
||||
$this->chapo = null;
|
||||
$this->postscriptum = null;
|
||||
$this->meta_title = null;
|
||||
$this->meta_description = null;
|
||||
$this->meta_keywords = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->clearAllReferences();
|
||||
$this->applyDefaultValues();
|
||||
|
||||
@@ -27,6 +27,9 @@ use Thelia\Model\Map\CategoryI18nTableMap;
|
||||
* @method ChildCategoryI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
||||
* @method ChildCategoryI18nQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
|
||||
* @method ChildCategoryI18nQuery orderByPostscriptum($order = Criteria::ASC) Order by the postscriptum column
|
||||
* @method ChildCategoryI18nQuery orderByMetaTitle($order = Criteria::ASC) Order by the meta_title column
|
||||
* @method ChildCategoryI18nQuery orderByMetaDescription($order = Criteria::ASC) Order by the meta_description column
|
||||
* @method ChildCategoryI18nQuery orderByMetaKeywords($order = Criteria::ASC) Order by the meta_keywords column
|
||||
*
|
||||
* @method ChildCategoryI18nQuery groupById() Group by the id column
|
||||
* @method ChildCategoryI18nQuery groupByLocale() Group by the locale column
|
||||
@@ -34,6 +37,9 @@ use Thelia\Model\Map\CategoryI18nTableMap;
|
||||
* @method ChildCategoryI18nQuery groupByDescription() Group by the description column
|
||||
* @method ChildCategoryI18nQuery groupByChapo() Group by the chapo column
|
||||
* @method ChildCategoryI18nQuery groupByPostscriptum() Group by the postscriptum column
|
||||
* @method ChildCategoryI18nQuery groupByMetaTitle() Group by the meta_title column
|
||||
* @method ChildCategoryI18nQuery groupByMetaDescription() Group by the meta_description column
|
||||
* @method ChildCategoryI18nQuery groupByMetaKeywords() Group by the meta_keywords column
|
||||
*
|
||||
* @method ChildCategoryI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildCategoryI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
@@ -52,6 +58,9 @@ use Thelia\Model\Map\CategoryI18nTableMap;
|
||||
* @method ChildCategoryI18n findOneByDescription(string $description) Return the first ChildCategoryI18n filtered by the description column
|
||||
* @method ChildCategoryI18n findOneByChapo(string $chapo) Return the first ChildCategoryI18n filtered by the chapo column
|
||||
* @method ChildCategoryI18n findOneByPostscriptum(string $postscriptum) Return the first ChildCategoryI18n filtered by the postscriptum column
|
||||
* @method ChildCategoryI18n findOneByMetaTitle(string $meta_title) Return the first ChildCategoryI18n filtered by the meta_title column
|
||||
* @method ChildCategoryI18n findOneByMetaDescription(string $meta_description) Return the first ChildCategoryI18n filtered by the meta_description column
|
||||
* @method ChildCategoryI18n findOneByMetaKeywords(string $meta_keywords) Return the first ChildCategoryI18n filtered by the meta_keywords column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildCategoryI18n objects filtered by the id column
|
||||
* @method array findByLocale(string $locale) Return ChildCategoryI18n objects filtered by the locale column
|
||||
@@ -59,6 +68,9 @@ use Thelia\Model\Map\CategoryI18nTableMap;
|
||||
* @method array findByDescription(string $description) Return ChildCategoryI18n objects filtered by the description column
|
||||
* @method array findByChapo(string $chapo) Return ChildCategoryI18n objects filtered by the chapo column
|
||||
* @method array findByPostscriptum(string $postscriptum) Return ChildCategoryI18n objects filtered by the postscriptum column
|
||||
* @method array findByMetaTitle(string $meta_title) Return ChildCategoryI18n objects filtered by the meta_title column
|
||||
* @method array findByMetaDescription(string $meta_description) Return ChildCategoryI18n objects filtered by the meta_description column
|
||||
* @method array findByMetaKeywords(string $meta_keywords) Return ChildCategoryI18n objects filtered by the meta_keywords column
|
||||
*
|
||||
*/
|
||||
abstract class CategoryI18nQuery extends ModelCriteria
|
||||
@@ -147,7 +159,7 @@ abstract class CategoryI18nQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM FROM category_i18n WHERE ID = :p0 AND LOCALE = :p1';
|
||||
$sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM, META_TITLE, META_DESCRIPTION, META_KEYWORDS FROM category_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 CategoryI18nQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CategoryI18nTableMap::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 ChildCategoryI18nQuery 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(CategoryI18nTableMap::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 ChildCategoryI18nQuery 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(CategoryI18nTableMap::META_DESCRIPTION, $metaDescription, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the meta_keywords column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByMetaKeywords('fooValue'); // WHERE meta_keywords = 'fooValue'
|
||||
* $query->filterByMetaKeywords('%fooValue%'); // WHERE meta_keywords LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $metaKeywords 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 ChildCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByMetaKeywords($metaKeywords = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($metaKeywords)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $metaKeywords)) {
|
||||
$metaKeywords = str_replace('*', '%', $metaKeywords);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CategoryI18nTableMap::META_KEYWORDS, $metaKeywords, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Category object
|
||||
*
|
||||
|
||||
@@ -3904,6 +3904,78 @@ abstract class Content 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\ContentI18n 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\ContentI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setMetaDescription($v)
|
||||
{ $this->getCurrentTranslation()->setMetaDescription($v);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the [meta_keywords] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMetaKeywords()
|
||||
{
|
||||
return $this->getCurrentTranslation()->getMetaKeywords();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the value of [meta_keywords] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\ContentI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setMetaKeywords($v)
|
||||
{ $this->getCurrentTranslation()->setMetaKeywords($v);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
// versionable behavior
|
||||
|
||||
/**
|
||||
|
||||
@@ -90,6 +90,24 @@ abstract class ContentI18n 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_keywords field.
|
||||
* @var string
|
||||
*/
|
||||
protected $meta_keywords;
|
||||
|
||||
/**
|
||||
* @var Content
|
||||
*/
|
||||
@@ -440,6 +458,39 @@ abstract class ContentI18n 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_keywords] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMetaKeywords()
|
||||
{
|
||||
|
||||
return $this->meta_keywords;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [id] column.
|
||||
*
|
||||
@@ -570,6 +621,69 @@ abstract class ContentI18n implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setPostscriptum()
|
||||
|
||||
/**
|
||||
* Set the value of [meta_title] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\ContentI18n 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[] = ContentI18nTableMap::META_TITLE;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setMetaTitle()
|
||||
|
||||
/**
|
||||
* Set the value of [meta_description] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\ContentI18n 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[] = ContentI18nTableMap::META_DESCRIPTION;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setMetaDescription()
|
||||
|
||||
/**
|
||||
* Set the value of [meta_keywords] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\ContentI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setMetaKeywords($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->meta_keywords !== $v) {
|
||||
$this->meta_keywords = $v;
|
||||
$this->modifiedColumns[] = ContentI18nTableMap::META_KEYWORDS;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setMetaKeywords()
|
||||
|
||||
/**
|
||||
* Indicates whether the columns in this object are only set to default values.
|
||||
*
|
||||
@@ -628,6 +742,15 @@ abstract class ContentI18n implements ActiveRecordInterface
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ContentI18nTableMap::translateFieldName('Postscriptum', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->postscriptum = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : ContentI18nTableMap::translateFieldName('MetaTitle', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->meta_title = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : ContentI18nTableMap::translateFieldName('MetaDescription', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->meta_description = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : ContentI18nTableMap::translateFieldName('MetaKeywords', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->meta_keywords = (null !== $col) ? (string) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
@@ -636,7 +759,7 @@ abstract class ContentI18n implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 6; // 6 = ContentI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 9; // 9 = ContentI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\ContentI18n object", 0, $e);
|
||||
@@ -875,6 +998,15 @@ abstract class ContentI18n implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(ContentI18nTableMap::POSTSCRIPTUM)) {
|
||||
$modifiedColumns[':p' . $index++] = 'POSTSCRIPTUM';
|
||||
}
|
||||
if ($this->isColumnModified(ContentI18nTableMap::META_TITLE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'META_TITLE';
|
||||
}
|
||||
if ($this->isColumnModified(ContentI18nTableMap::META_DESCRIPTION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'META_DESCRIPTION';
|
||||
}
|
||||
if ($this->isColumnModified(ContentI18nTableMap::META_KEYWORDS)) {
|
||||
$modifiedColumns[':p' . $index++] = 'META_KEYWORDS';
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
'INSERT INTO content_i18n (%s) VALUES (%s)',
|
||||
@@ -904,6 +1036,15 @@ abstract class ContentI18n 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_KEYWORDS':
|
||||
$stmt->bindValue($identifier, $this->meta_keywords, PDO::PARAM_STR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
$stmt->execute();
|
||||
@@ -977,6 +1118,15 @@ abstract class ContentI18n implements ActiveRecordInterface
|
||||
case 5:
|
||||
return $this->getPostscriptum();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getMetaTitle();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getMetaDescription();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getMetaKeywords();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
@@ -1012,6 +1162,9 @@ abstract class ContentI18n 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->getMetaKeywords(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||
@@ -1074,6 +1227,15 @@ abstract class ContentI18n implements ActiveRecordInterface
|
||||
case 5:
|
||||
$this->setPostscriptum($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setMetaTitle($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setMetaDescription($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setMetaKeywords($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
@@ -1104,6 +1266,9 @@ abstract class ContentI18n 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->setMetaKeywords($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1121,6 +1286,9 @@ abstract class ContentI18n implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(ContentI18nTableMap::DESCRIPTION)) $criteria->add(ContentI18nTableMap::DESCRIPTION, $this->description);
|
||||
if ($this->isColumnModified(ContentI18nTableMap::CHAPO)) $criteria->add(ContentI18nTableMap::CHAPO, $this->chapo);
|
||||
if ($this->isColumnModified(ContentI18nTableMap::POSTSCRIPTUM)) $criteria->add(ContentI18nTableMap::POSTSCRIPTUM, $this->postscriptum);
|
||||
if ($this->isColumnModified(ContentI18nTableMap::META_TITLE)) $criteria->add(ContentI18nTableMap::META_TITLE, $this->meta_title);
|
||||
if ($this->isColumnModified(ContentI18nTableMap::META_DESCRIPTION)) $criteria->add(ContentI18nTableMap::META_DESCRIPTION, $this->meta_description);
|
||||
if ($this->isColumnModified(ContentI18nTableMap::META_KEYWORDS)) $criteria->add(ContentI18nTableMap::META_KEYWORDS, $this->meta_keywords);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -1197,6 +1365,9 @@ abstract class ContentI18n implements ActiveRecordInterface
|
||||
$copyObj->setDescription($this->getDescription());
|
||||
$copyObj->setChapo($this->getChapo());
|
||||
$copyObj->setPostscriptum($this->getPostscriptum());
|
||||
$copyObj->setMetaTitle($this->getMetaTitle());
|
||||
$copyObj->setMetaDescription($this->getMetaDescription());
|
||||
$copyObj->setMetaKeywords($this->getMetaKeywords());
|
||||
if ($makeNew) {
|
||||
$copyObj->setNew(true);
|
||||
}
|
||||
@@ -1286,6 +1457,9 @@ abstract class ContentI18n implements ActiveRecordInterface
|
||||
$this->description = null;
|
||||
$this->chapo = null;
|
||||
$this->postscriptum = null;
|
||||
$this->meta_title = null;
|
||||
$this->meta_description = null;
|
||||
$this->meta_keywords = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->clearAllReferences();
|
||||
$this->applyDefaultValues();
|
||||
|
||||
@@ -27,6 +27,9 @@ use Thelia\Model\Map\ContentI18nTableMap;
|
||||
* @method ChildContentI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
||||
* @method ChildContentI18nQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
|
||||
* @method ChildContentI18nQuery orderByPostscriptum($order = Criteria::ASC) Order by the postscriptum column
|
||||
* @method ChildContentI18nQuery orderByMetaTitle($order = Criteria::ASC) Order by the meta_title column
|
||||
* @method ChildContentI18nQuery orderByMetaDescription($order = Criteria::ASC) Order by the meta_description column
|
||||
* @method ChildContentI18nQuery orderByMetaKeywords($order = Criteria::ASC) Order by the meta_keywords column
|
||||
*
|
||||
* @method ChildContentI18nQuery groupById() Group by the id column
|
||||
* @method ChildContentI18nQuery groupByLocale() Group by the locale column
|
||||
@@ -34,6 +37,9 @@ use Thelia\Model\Map\ContentI18nTableMap;
|
||||
* @method ChildContentI18nQuery groupByDescription() Group by the description column
|
||||
* @method ChildContentI18nQuery groupByChapo() Group by the chapo column
|
||||
* @method ChildContentI18nQuery groupByPostscriptum() Group by the postscriptum column
|
||||
* @method ChildContentI18nQuery groupByMetaTitle() Group by the meta_title column
|
||||
* @method ChildContentI18nQuery groupByMetaDescription() Group by the meta_description column
|
||||
* @method ChildContentI18nQuery groupByMetaKeywords() Group by the meta_keywords column
|
||||
*
|
||||
* @method ChildContentI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildContentI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
@@ -52,6 +58,9 @@ use Thelia\Model\Map\ContentI18nTableMap;
|
||||
* @method ChildContentI18n findOneByDescription(string $description) Return the first ChildContentI18n filtered by the description column
|
||||
* @method ChildContentI18n findOneByChapo(string $chapo) Return the first ChildContentI18n filtered by the chapo column
|
||||
* @method ChildContentI18n findOneByPostscriptum(string $postscriptum) Return the first ChildContentI18n filtered by the postscriptum column
|
||||
* @method ChildContentI18n findOneByMetaTitle(string $meta_title) Return the first ChildContentI18n filtered by the meta_title column
|
||||
* @method ChildContentI18n findOneByMetaDescription(string $meta_description) Return the first ChildContentI18n filtered by the meta_description column
|
||||
* @method ChildContentI18n findOneByMetaKeywords(string $meta_keywords) Return the first ChildContentI18n filtered by the meta_keywords column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildContentI18n objects filtered by the id column
|
||||
* @method array findByLocale(string $locale) Return ChildContentI18n objects filtered by the locale column
|
||||
@@ -59,6 +68,9 @@ use Thelia\Model\Map\ContentI18nTableMap;
|
||||
* @method array findByDescription(string $description) Return ChildContentI18n objects filtered by the description column
|
||||
* @method array findByChapo(string $chapo) Return ChildContentI18n objects filtered by the chapo column
|
||||
* @method array findByPostscriptum(string $postscriptum) Return ChildContentI18n objects filtered by the postscriptum column
|
||||
* @method array findByMetaTitle(string $meta_title) Return ChildContentI18n objects filtered by the meta_title column
|
||||
* @method array findByMetaDescription(string $meta_description) Return ChildContentI18n objects filtered by the meta_description column
|
||||
* @method array findByMetaKeywords(string $meta_keywords) Return ChildContentI18n objects filtered by the meta_keywords column
|
||||
*
|
||||
*/
|
||||
abstract class ContentI18nQuery extends ModelCriteria
|
||||
@@ -147,7 +159,7 @@ abstract class ContentI18nQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM FROM content_i18n WHERE ID = :p0 AND LOCALE = :p1';
|
||||
$sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM, META_TITLE, META_DESCRIPTION, META_KEYWORDS FROM content_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 ContentI18nQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(ContentI18nTableMap::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 ChildContentI18nQuery 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(ContentI18nTableMap::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 ChildContentI18nQuery 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(ContentI18nTableMap::META_DESCRIPTION, $metaDescription, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the meta_keywords column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByMetaKeywords('fooValue'); // WHERE meta_keywords = 'fooValue'
|
||||
* $query->filterByMetaKeywords('%fooValue%'); // WHERE meta_keywords LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $metaKeywords 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 ChildContentI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByMetaKeywords($metaKeywords = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($metaKeywords)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $metaKeywords)) {
|
||||
$metaKeywords = str_replace('*', '%', $metaKeywords);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ContentI18nTableMap::META_KEYWORDS, $metaKeywords, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Content object
|
||||
*
|
||||
|
||||
@@ -3368,6 +3368,78 @@ abstract class Folder 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\FolderI18n 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\FolderI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setMetaDescription($v)
|
||||
{ $this->getCurrentTranslation()->setMetaDescription($v);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the [meta_keywords] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMetaKeywords()
|
||||
{
|
||||
return $this->getCurrentTranslation()->getMetaKeywords();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the value of [meta_keywords] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\FolderI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setMetaKeywords($v)
|
||||
{ $this->getCurrentTranslation()->setMetaKeywords($v);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
// versionable behavior
|
||||
|
||||
/**
|
||||
|
||||
@@ -90,6 +90,24 @@ abstract class FolderI18n 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_keywords field.
|
||||
* @var string
|
||||
*/
|
||||
protected $meta_keywords;
|
||||
|
||||
/**
|
||||
* @var Folder
|
||||
*/
|
||||
@@ -440,6 +458,39 @@ abstract class FolderI18n 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_keywords] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMetaKeywords()
|
||||
{
|
||||
|
||||
return $this->meta_keywords;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [id] column.
|
||||
*
|
||||
@@ -570,6 +621,69 @@ abstract class FolderI18n implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setPostscriptum()
|
||||
|
||||
/**
|
||||
* Set the value of [meta_title] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\FolderI18n 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[] = FolderI18nTableMap::META_TITLE;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setMetaTitle()
|
||||
|
||||
/**
|
||||
* Set the value of [meta_description] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\FolderI18n 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[] = FolderI18nTableMap::META_DESCRIPTION;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setMetaDescription()
|
||||
|
||||
/**
|
||||
* Set the value of [meta_keywords] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\FolderI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setMetaKeywords($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->meta_keywords !== $v) {
|
||||
$this->meta_keywords = $v;
|
||||
$this->modifiedColumns[] = FolderI18nTableMap::META_KEYWORDS;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setMetaKeywords()
|
||||
|
||||
/**
|
||||
* Indicates whether the columns in this object are only set to default values.
|
||||
*
|
||||
@@ -628,6 +742,15 @@ abstract class FolderI18n implements ActiveRecordInterface
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : FolderI18nTableMap::translateFieldName('Postscriptum', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->postscriptum = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : FolderI18nTableMap::translateFieldName('MetaTitle', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->meta_title = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : FolderI18nTableMap::translateFieldName('MetaDescription', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->meta_description = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : FolderI18nTableMap::translateFieldName('MetaKeywords', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->meta_keywords = (null !== $col) ? (string) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
@@ -636,7 +759,7 @@ abstract class FolderI18n implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 6; // 6 = FolderI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 9; // 9 = FolderI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\FolderI18n object", 0, $e);
|
||||
@@ -875,6 +998,15 @@ abstract class FolderI18n implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(FolderI18nTableMap::POSTSCRIPTUM)) {
|
||||
$modifiedColumns[':p' . $index++] = 'POSTSCRIPTUM';
|
||||
}
|
||||
if ($this->isColumnModified(FolderI18nTableMap::META_TITLE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'META_TITLE';
|
||||
}
|
||||
if ($this->isColumnModified(FolderI18nTableMap::META_DESCRIPTION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'META_DESCRIPTION';
|
||||
}
|
||||
if ($this->isColumnModified(FolderI18nTableMap::META_KEYWORDS)) {
|
||||
$modifiedColumns[':p' . $index++] = 'META_KEYWORDS';
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
'INSERT INTO folder_i18n (%s) VALUES (%s)',
|
||||
@@ -904,6 +1036,15 @@ abstract class FolderI18n 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_KEYWORDS':
|
||||
$stmt->bindValue($identifier, $this->meta_keywords, PDO::PARAM_STR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
$stmt->execute();
|
||||
@@ -977,6 +1118,15 @@ abstract class FolderI18n implements ActiveRecordInterface
|
||||
case 5:
|
||||
return $this->getPostscriptum();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getMetaTitle();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getMetaDescription();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getMetaKeywords();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
@@ -1012,6 +1162,9 @@ abstract class FolderI18n 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->getMetaKeywords(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||
@@ -1074,6 +1227,15 @@ abstract class FolderI18n implements ActiveRecordInterface
|
||||
case 5:
|
||||
$this->setPostscriptum($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setMetaTitle($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setMetaDescription($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setMetaKeywords($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
@@ -1104,6 +1266,9 @@ abstract class FolderI18n 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->setMetaKeywords($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1121,6 +1286,9 @@ abstract class FolderI18n implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(FolderI18nTableMap::DESCRIPTION)) $criteria->add(FolderI18nTableMap::DESCRIPTION, $this->description);
|
||||
if ($this->isColumnModified(FolderI18nTableMap::CHAPO)) $criteria->add(FolderI18nTableMap::CHAPO, $this->chapo);
|
||||
if ($this->isColumnModified(FolderI18nTableMap::POSTSCRIPTUM)) $criteria->add(FolderI18nTableMap::POSTSCRIPTUM, $this->postscriptum);
|
||||
if ($this->isColumnModified(FolderI18nTableMap::META_TITLE)) $criteria->add(FolderI18nTableMap::META_TITLE, $this->meta_title);
|
||||
if ($this->isColumnModified(FolderI18nTableMap::META_DESCRIPTION)) $criteria->add(FolderI18nTableMap::META_DESCRIPTION, $this->meta_description);
|
||||
if ($this->isColumnModified(FolderI18nTableMap::META_KEYWORDS)) $criteria->add(FolderI18nTableMap::META_KEYWORDS, $this->meta_keywords);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -1197,6 +1365,9 @@ abstract class FolderI18n implements ActiveRecordInterface
|
||||
$copyObj->setDescription($this->getDescription());
|
||||
$copyObj->setChapo($this->getChapo());
|
||||
$copyObj->setPostscriptum($this->getPostscriptum());
|
||||
$copyObj->setMetaTitle($this->getMetaTitle());
|
||||
$copyObj->setMetaDescription($this->getMetaDescription());
|
||||
$copyObj->setMetaKeywords($this->getMetaKeywords());
|
||||
if ($makeNew) {
|
||||
$copyObj->setNew(true);
|
||||
}
|
||||
@@ -1286,6 +1457,9 @@ abstract class FolderI18n implements ActiveRecordInterface
|
||||
$this->description = null;
|
||||
$this->chapo = null;
|
||||
$this->postscriptum = null;
|
||||
$this->meta_title = null;
|
||||
$this->meta_description = null;
|
||||
$this->meta_keywords = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->clearAllReferences();
|
||||
$this->applyDefaultValues();
|
||||
|
||||
@@ -27,6 +27,9 @@ use Thelia\Model\Map\FolderI18nTableMap;
|
||||
* @method ChildFolderI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
||||
* @method ChildFolderI18nQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
|
||||
* @method ChildFolderI18nQuery orderByPostscriptum($order = Criteria::ASC) Order by the postscriptum column
|
||||
* @method ChildFolderI18nQuery orderByMetaTitle($order = Criteria::ASC) Order by the meta_title column
|
||||
* @method ChildFolderI18nQuery orderByMetaDescription($order = Criteria::ASC) Order by the meta_description column
|
||||
* @method ChildFolderI18nQuery orderByMetaKeywords($order = Criteria::ASC) Order by the meta_keywords column
|
||||
*
|
||||
* @method ChildFolderI18nQuery groupById() Group by the id column
|
||||
* @method ChildFolderI18nQuery groupByLocale() Group by the locale column
|
||||
@@ -34,6 +37,9 @@ use Thelia\Model\Map\FolderI18nTableMap;
|
||||
* @method ChildFolderI18nQuery groupByDescription() Group by the description column
|
||||
* @method ChildFolderI18nQuery groupByChapo() Group by the chapo column
|
||||
* @method ChildFolderI18nQuery groupByPostscriptum() Group by the postscriptum column
|
||||
* @method ChildFolderI18nQuery groupByMetaTitle() Group by the meta_title column
|
||||
* @method ChildFolderI18nQuery groupByMetaDescription() Group by the meta_description column
|
||||
* @method ChildFolderI18nQuery groupByMetaKeywords() Group by the meta_keywords column
|
||||
*
|
||||
* @method ChildFolderI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildFolderI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
@@ -52,6 +58,9 @@ use Thelia\Model\Map\FolderI18nTableMap;
|
||||
* @method ChildFolderI18n findOneByDescription(string $description) Return the first ChildFolderI18n filtered by the description column
|
||||
* @method ChildFolderI18n findOneByChapo(string $chapo) Return the first ChildFolderI18n filtered by the chapo column
|
||||
* @method ChildFolderI18n findOneByPostscriptum(string $postscriptum) Return the first ChildFolderI18n filtered by the postscriptum column
|
||||
* @method ChildFolderI18n findOneByMetaTitle(string $meta_title) Return the first ChildFolderI18n filtered by the meta_title column
|
||||
* @method ChildFolderI18n findOneByMetaDescription(string $meta_description) Return the first ChildFolderI18n filtered by the meta_description column
|
||||
* @method ChildFolderI18n findOneByMetaKeywords(string $meta_keywords) Return the first ChildFolderI18n filtered by the meta_keywords column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildFolderI18n objects filtered by the id column
|
||||
* @method array findByLocale(string $locale) Return ChildFolderI18n objects filtered by the locale column
|
||||
@@ -59,6 +68,9 @@ use Thelia\Model\Map\FolderI18nTableMap;
|
||||
* @method array findByDescription(string $description) Return ChildFolderI18n objects filtered by the description column
|
||||
* @method array findByChapo(string $chapo) Return ChildFolderI18n objects filtered by the chapo column
|
||||
* @method array findByPostscriptum(string $postscriptum) Return ChildFolderI18n objects filtered by the postscriptum column
|
||||
* @method array findByMetaTitle(string $meta_title) Return ChildFolderI18n objects filtered by the meta_title column
|
||||
* @method array findByMetaDescription(string $meta_description) Return ChildFolderI18n objects filtered by the meta_description column
|
||||
* @method array findByMetaKeywords(string $meta_keywords) Return ChildFolderI18n objects filtered by the meta_keywords column
|
||||
*
|
||||
*/
|
||||
abstract class FolderI18nQuery extends ModelCriteria
|
||||
@@ -147,7 +159,7 @@ abstract class FolderI18nQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM FROM folder_i18n WHERE ID = :p0 AND LOCALE = :p1';
|
||||
$sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM, META_TITLE, META_DESCRIPTION, META_KEYWORDS FROM folder_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 FolderI18nQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(FolderI18nTableMap::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 ChildFolderI18nQuery 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(FolderI18nTableMap::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 ChildFolderI18nQuery 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(FolderI18nTableMap::META_DESCRIPTION, $metaDescription, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the meta_keywords column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByMetaKeywords('fooValue'); // WHERE meta_keywords = 'fooValue'
|
||||
* $query->filterByMetaKeywords('%fooValue%'); // WHERE meta_keywords LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $metaKeywords 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 ChildFolderI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByMetaKeywords($metaKeywords = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($metaKeywords)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $metaKeywords)) {
|
||||
$metaKeywords = str_replace('*', '%', $metaKeywords);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(FolderI18nTableMap::META_KEYWORDS, $metaKeywords, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Folder object
|
||||
*
|
||||
|
||||
1016
core/lib/Thelia/Model/Base/OrderCouponQuery.php
Normal file
1016
core/lib/Thelia/Model/Base/OrderCouponQuery.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -5916,24 +5916,24 @@ abstract class Product implements ActiveRecordInterface
|
||||
|
||||
|
||||
/**
|
||||
* Get the [meta_keyword] column value.
|
||||
* Get the [meta_keywords] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMetaKeyword()
|
||||
public function getMetaKeywords()
|
||||
{
|
||||
return $this->getCurrentTranslation()->getMetaKeyword();
|
||||
return $this->getCurrentTranslation()->getMetaKeywords();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the value of [meta_keyword] column.
|
||||
* Set the value of [meta_keywords] 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);
|
||||
public function setMetaKeywords($v)
|
||||
{ $this->getCurrentTranslation()->setMetaKeywords($v);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -103,10 +103,10 @@ abstract class ProductI18n implements ActiveRecordInterface
|
||||
protected $meta_description;
|
||||
|
||||
/**
|
||||
* The value for the meta_keyword field.
|
||||
* The value for the meta_keywords field.
|
||||
* @var string
|
||||
*/
|
||||
protected $meta_keyword;
|
||||
protected $meta_keywords;
|
||||
|
||||
/**
|
||||
* @var Product
|
||||
@@ -481,14 +481,14 @@ abstract class ProductI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [meta_keyword] column value.
|
||||
* Get the [meta_keywords] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMetaKeyword()
|
||||
public function getMetaKeywords()
|
||||
{
|
||||
|
||||
return $this->meta_keyword;
|
||||
return $this->meta_keywords;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -664,25 +664,25 @@ abstract class ProductI18n implements ActiveRecordInterface
|
||||
} // setMetaDescription()
|
||||
|
||||
/**
|
||||
* Set the value of [meta_keyword] column.
|
||||
* Set the value of [meta_keywords] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\ProductI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setMetaKeyword($v)
|
||||
public function setMetaKeywords($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->meta_keyword !== $v) {
|
||||
$this->meta_keyword = $v;
|
||||
$this->modifiedColumns[] = ProductI18nTableMap::META_KEYWORD;
|
||||
if ($this->meta_keywords !== $v) {
|
||||
$this->meta_keywords = $v;
|
||||
$this->modifiedColumns[] = ProductI18nTableMap::META_KEYWORDS;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setMetaKeyword()
|
||||
} // setMetaKeywords()
|
||||
|
||||
/**
|
||||
* Indicates whether the columns in this object are only set to default values.
|
||||
@@ -749,8 +749,8 @@ abstract class ProductI18n implements ActiveRecordInterface
|
||||
$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;
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : ProductI18nTableMap::translateFieldName('MetaKeywords', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->meta_keywords = (null !== $col) ? (string) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
@@ -1004,8 +1004,8 @@ abstract class ProductI18n implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(ProductI18nTableMap::META_DESCRIPTION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'META_DESCRIPTION';
|
||||
}
|
||||
if ($this->isColumnModified(ProductI18nTableMap::META_KEYWORD)) {
|
||||
$modifiedColumns[':p' . $index++] = 'META_KEYWORD';
|
||||
if ($this->isColumnModified(ProductI18nTableMap::META_KEYWORDS)) {
|
||||
$modifiedColumns[':p' . $index++] = 'META_KEYWORDS';
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
@@ -1042,8 +1042,8 @@ abstract class ProductI18n implements ActiveRecordInterface
|
||||
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);
|
||||
case 'META_KEYWORDS':
|
||||
$stmt->bindValue($identifier, $this->meta_keywords, PDO::PARAM_STR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1125,7 +1125,7 @@ abstract class ProductI18n implements ActiveRecordInterface
|
||||
return $this->getMetaDescription();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getMetaKeyword();
|
||||
return $this->getMetaKeywords();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
@@ -1164,7 +1164,7 @@ abstract class ProductI18n implements ActiveRecordInterface
|
||||
$keys[5] => $this->getPostscriptum(),
|
||||
$keys[6] => $this->getMetaTitle(),
|
||||
$keys[7] => $this->getMetaDescription(),
|
||||
$keys[8] => $this->getMetaKeyword(),
|
||||
$keys[8] => $this->getMetaKeywords(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||
@@ -1234,7 +1234,7 @@ abstract class ProductI18n implements ActiveRecordInterface
|
||||
$this->setMetaDescription($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setMetaKeyword($value);
|
||||
$this->setMetaKeywords($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
@@ -1268,7 +1268,7 @@ abstract class ProductI18n implements ActiveRecordInterface
|
||||
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]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setMetaKeywords($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1288,7 +1288,7 @@ abstract class ProductI18n implements ActiveRecordInterface
|
||||
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);
|
||||
if ($this->isColumnModified(ProductI18nTableMap::META_KEYWORDS)) $criteria->add(ProductI18nTableMap::META_KEYWORDS, $this->meta_keywords);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -1367,7 +1367,7 @@ abstract class ProductI18n implements ActiveRecordInterface
|
||||
$copyObj->setPostscriptum($this->getPostscriptum());
|
||||
$copyObj->setMetaTitle($this->getMetaTitle());
|
||||
$copyObj->setMetaDescription($this->getMetaDescription());
|
||||
$copyObj->setMetaKeyword($this->getMetaKeyword());
|
||||
$copyObj->setMetaKeywords($this->getMetaKeywords());
|
||||
if ($makeNew) {
|
||||
$copyObj->setNew(true);
|
||||
}
|
||||
@@ -1459,7 +1459,7 @@ abstract class ProductI18n implements ActiveRecordInterface
|
||||
$this->postscriptum = null;
|
||||
$this->meta_title = null;
|
||||
$this->meta_description = null;
|
||||
$this->meta_keyword = null;
|
||||
$this->meta_keywords = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->clearAllReferences();
|
||||
$this->applyDefaultValues();
|
||||
|
||||
@@ -29,7 +29,7 @@ use Thelia\Model\Map\ProductI18nTableMap;
|
||||
* @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 orderByMetaKeywords($order = Criteria::ASC) Order by the meta_keywords column
|
||||
*
|
||||
* @method ChildProductI18nQuery groupById() Group by the id column
|
||||
* @method ChildProductI18nQuery groupByLocale() Group by the locale column
|
||||
@@ -39,7 +39,7 @@ use Thelia\Model\Map\ProductI18nTableMap;
|
||||
* @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 groupByMetaKeywords() Group by the meta_keywords 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
|
||||
@@ -60,7 +60,7 @@ use Thelia\Model\Map\ProductI18nTableMap;
|
||||
* @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 ChildProductI18n findOneByMetaKeywords(string $meta_keywords) Return the first ChildProductI18n filtered by the meta_keywords 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
|
||||
@@ -70,7 +70,7 @@ use Thelia\Model\Map\ProductI18nTableMap;
|
||||
* @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
|
||||
* @method array findByMetaKeywords(string $meta_keywords) Return ChildProductI18n objects filtered by the meta_keywords column
|
||||
*
|
||||
*/
|
||||
abstract class ProductI18nQuery extends ModelCriteria
|
||||
@@ -159,7 +159,7 @@ abstract class ProductI18nQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM, META_TITLE, META_DESCRIPTION, META_KEYWORD FROM product_i18n WHERE ID = :p0 AND LOCALE = :p1';
|
||||
$sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM, META_TITLE, META_DESCRIPTION, META_KEYWORDS FROM product_i18n WHERE ID = :p0 AND LOCALE = :p1';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||
@@ -507,32 +507,32 @@ abstract class ProductI18nQuery extends ModelCriteria
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the meta_keyword column
|
||||
* Filter the query on the meta_keywords column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByMetaKeyword('fooValue'); // WHERE meta_keyword = 'fooValue'
|
||||
* $query->filterByMetaKeyword('%fooValue%'); // WHERE meta_keyword LIKE '%fooValue%'
|
||||
* $query->filterByMetaKeywords('fooValue'); // WHERE meta_keywords = 'fooValue'
|
||||
* $query->filterByMetaKeywords('%fooValue%'); // WHERE meta_keywords LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $metaKeyword The value to use as filter.
|
||||
* @param string $metaKeywords 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)
|
||||
public function filterByMetaKeywords($metaKeywords = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($metaKeyword)) {
|
||||
if (is_array($metaKeywords)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $metaKeyword)) {
|
||||
$metaKeyword = str_replace('*', '%', $metaKeyword);
|
||||
} elseif (preg_match('/[\%\*]/', $metaKeywords)) {
|
||||
$metaKeywords = str_replace('*', '%', $metaKeywords);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ProductI18nTableMap::META_KEYWORD, $metaKeyword, $comparison);
|
||||
return $this->addUsingAlias(ProductI18nTableMap::META_KEYWORDS, $metaKeywords, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -106,7 +106,11 @@ class Category extends BaseCategory
|
||||
public function preDelete(ConnectionInterface $con = null)
|
||||
{
|
||||
$this->dispatchEvent(TheliaEvents::BEFORE_DELETECATEGORY, new CategoryEvent($this));
|
||||
$this->reorderBeforeDelete();
|
||||
$this->reorderBeforeDelete(
|
||||
array(
|
||||
"parent" => $this->getParent(),
|
||||
)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
class CategoryDocument extends BaseCategoryDocument
|
||||
{
|
||||
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
|
||||
use \Thelia\Model\Tools\PositionManagementTrait;
|
||||
|
||||
/**
|
||||
@@ -49,4 +50,14 @@ class CategoryDocument extends BaseCategoryDocument
|
||||
{
|
||||
return $this->getCategoryId();
|
||||
}
|
||||
|
||||
public function preDelete(ConnectionInterface $con = null)
|
||||
{
|
||||
$this->reorderBeforeDelete(
|
||||
array(
|
||||
"category_id" => $this->getCategoryId(),
|
||||
)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
class CategoryImage extends BaseCategoryImage
|
||||
{
|
||||
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
|
||||
use \Thelia\Model\Tools\PositionManagementTrait;
|
||||
|
||||
/**
|
||||
@@ -52,4 +53,13 @@ class CategoryImage extends BaseCategoryImage
|
||||
return $this->getCategoryId();
|
||||
}
|
||||
|
||||
public function preDelete(ConnectionInterface $con = null)
|
||||
{
|
||||
$this->reorderBeforeDelete(
|
||||
array(
|
||||
"category_id" => $this->getCategoryId(),
|
||||
)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
class ContentDocument extends BaseContentDocument
|
||||
{
|
||||
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
|
||||
use \Thelia\Model\Tools\PositionManagementTrait;
|
||||
|
||||
/**
|
||||
@@ -49,4 +50,14 @@ class ContentDocument extends BaseContentDocument
|
||||
{
|
||||
return $this->getContentId();
|
||||
}
|
||||
|
||||
public function preDelete(ConnectionInterface $con = null)
|
||||
{
|
||||
$this->reorderBeforeDelete(
|
||||
array(
|
||||
"content_id" => $this->getContentId(),
|
||||
)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
class ContentImage extends BaseContentImage
|
||||
{
|
||||
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
|
||||
use \Thelia\Model\Tools\PositionManagementTrait;
|
||||
|
||||
/**
|
||||
@@ -49,4 +50,14 @@ class ContentImage extends BaseContentImage
|
||||
{
|
||||
return $this->getContentId();
|
||||
}
|
||||
|
||||
public function preDelete(ConnectionInterface $con = null)
|
||||
{
|
||||
$this->reorderBeforeDelete(
|
||||
array(
|
||||
"content_id" => $this->getContentId(),
|
||||
)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,11 @@ class Folder extends BaseFolder
|
||||
public function preDelete(ConnectionInterface $con = null)
|
||||
{
|
||||
$this->dispatchEvent(TheliaEvents::BEFORE_DELETEFOLDER, new FolderEvent($this));
|
||||
$this->reorderBeforeDelete();
|
||||
$this->reorderBeforeDelete(
|
||||
array(
|
||||
"parent" => $this->getParent(),
|
||||
)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
class FolderDocument extends BaseFolderDocument
|
||||
{
|
||||
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
|
||||
use \Thelia\Model\Tools\PositionManagementTrait;
|
||||
|
||||
/**
|
||||
@@ -49,4 +50,14 @@ class FolderDocument extends BaseFolderDocument
|
||||
{
|
||||
return $this->getFolderId();
|
||||
}
|
||||
|
||||
public function preDelete(ConnectionInterface $con = null)
|
||||
{
|
||||
$this->reorderBeforeDelete(
|
||||
array(
|
||||
"folder_id" => $this->getFolderId(),
|
||||
)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
class FolderImage extends BaseFolderImage
|
||||
{
|
||||
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
|
||||
use \Thelia\Model\Tools\PositionManagementTrait;
|
||||
|
||||
/**
|
||||
@@ -49,4 +50,14 @@ class FolderImage extends BaseFolderImage
|
||||
{
|
||||
return $this->getFolderId();
|
||||
}
|
||||
|
||||
public function preDelete(ConnectionInterface $con = null)
|
||||
{
|
||||
$this->reorderBeforeDelete(
|
||||
array(
|
||||
"folder_id" => $this->getFolderId(),
|
||||
)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ class CategoryI18nTableMap 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 CategoryI18nTableMap 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 CategoryI18nTableMap extends TableMap
|
||||
*/
|
||||
const POSTSCRIPTUM = 'category_i18n.POSTSCRIPTUM';
|
||||
|
||||
/**
|
||||
* the column name for the META_TITLE field
|
||||
*/
|
||||
const META_TITLE = 'category_i18n.META_TITLE';
|
||||
|
||||
/**
|
||||
* the column name for the META_DESCRIPTION field
|
||||
*/
|
||||
const META_DESCRIPTION = 'category_i18n.META_DESCRIPTION';
|
||||
|
||||
/**
|
||||
* the column name for the META_KEYWORDS field
|
||||
*/
|
||||
const META_KEYWORDS = 'category_i18n.META_KEYWORDS';
|
||||
|
||||
/**
|
||||
* The default string format for model objects of the related table
|
||||
*/
|
||||
@@ -111,12 +126,12 @@ class CategoryI18nTableMap 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(CategoryI18nTableMap::ID, CategoryI18nTableMap::LOCALE, CategoryI18nTableMap::TITLE, CategoryI18nTableMap::DESCRIPTION, CategoryI18nTableMap::CHAPO, CategoryI18nTableMap::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', 'MetaKeywords', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', 'metaTitle', 'metaDescription', 'metaKeywords', ),
|
||||
self::TYPE_COLNAME => array(CategoryI18nTableMap::ID, CategoryI18nTableMap::LOCALE, CategoryI18nTableMap::TITLE, CategoryI18nTableMap::DESCRIPTION, CategoryI18nTableMap::CHAPO, CategoryI18nTableMap::POSTSCRIPTUM, CategoryI18nTableMap::META_TITLE, CategoryI18nTableMap::META_DESCRIPTION, CategoryI18nTableMap::META_KEYWORDS, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', 'CHAPO', 'POSTSCRIPTUM', 'META_TITLE', 'META_DESCRIPTION', 'META_KEYWORDS', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', 'meta_title', 'meta_description', 'meta_keywords', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -126,12 +141,12 @@ class CategoryI18nTableMap 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(CategoryI18nTableMap::ID => 0, CategoryI18nTableMap::LOCALE => 1, CategoryI18nTableMap::TITLE => 2, CategoryI18nTableMap::DESCRIPTION => 3, CategoryI18nTableMap::CHAPO => 4, CategoryI18nTableMap::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, 'MetaKeywords' => 8, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, 'metaTitle' => 6, 'metaDescription' => 7, 'metaKeywords' => 8, ),
|
||||
self::TYPE_COLNAME => array(CategoryI18nTableMap::ID => 0, CategoryI18nTableMap::LOCALE => 1, CategoryI18nTableMap::TITLE => 2, CategoryI18nTableMap::DESCRIPTION => 3, CategoryI18nTableMap::CHAPO => 4, CategoryI18nTableMap::POSTSCRIPTUM => 5, CategoryI18nTableMap::META_TITLE => 6, CategoryI18nTableMap::META_DESCRIPTION => 7, CategoryI18nTableMap::META_KEYWORDS => 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_KEYWORDS' => 8, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, 'meta_title' => 6, 'meta_description' => 7, 'meta_keywords' => 8, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -156,6 +171,9 @@ class CategoryI18nTableMap 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_KEYWORDS', 'MetaKeywords', 'LONGVARCHAR', false, null, null);
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
@@ -359,6 +377,9 @@ class CategoryI18nTableMap extends TableMap
|
||||
$criteria->addSelectColumn(CategoryI18nTableMap::DESCRIPTION);
|
||||
$criteria->addSelectColumn(CategoryI18nTableMap::CHAPO);
|
||||
$criteria->addSelectColumn(CategoryI18nTableMap::POSTSCRIPTUM);
|
||||
$criteria->addSelectColumn(CategoryI18nTableMap::META_TITLE);
|
||||
$criteria->addSelectColumn(CategoryI18nTableMap::META_DESCRIPTION);
|
||||
$criteria->addSelectColumn(CategoryI18nTableMap::META_KEYWORDS);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.LOCALE');
|
||||
@@ -366,6 +387,9 @@ class CategoryI18nTableMap 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_KEYWORDS');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ class CategoryTableMap extends TableMap
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'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_keywords', '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', ),
|
||||
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
||||
);
|
||||
|
||||
@@ -57,7 +57,7 @@ class ContentI18nTableMap 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 ContentI18nTableMap 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 ContentI18nTableMap extends TableMap
|
||||
*/
|
||||
const POSTSCRIPTUM = 'content_i18n.POSTSCRIPTUM';
|
||||
|
||||
/**
|
||||
* the column name for the META_TITLE field
|
||||
*/
|
||||
const META_TITLE = 'content_i18n.META_TITLE';
|
||||
|
||||
/**
|
||||
* the column name for the META_DESCRIPTION field
|
||||
*/
|
||||
const META_DESCRIPTION = 'content_i18n.META_DESCRIPTION';
|
||||
|
||||
/**
|
||||
* the column name for the META_KEYWORDS field
|
||||
*/
|
||||
const META_KEYWORDS = 'content_i18n.META_KEYWORDS';
|
||||
|
||||
/**
|
||||
* The default string format for model objects of the related table
|
||||
*/
|
||||
@@ -111,12 +126,12 @@ class ContentI18nTableMap 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(ContentI18nTableMap::ID, ContentI18nTableMap::LOCALE, ContentI18nTableMap::TITLE, ContentI18nTableMap::DESCRIPTION, ContentI18nTableMap::CHAPO, ContentI18nTableMap::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', 'MetaKeywords', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', 'metaTitle', 'metaDescription', 'metaKeywords', ),
|
||||
self::TYPE_COLNAME => array(ContentI18nTableMap::ID, ContentI18nTableMap::LOCALE, ContentI18nTableMap::TITLE, ContentI18nTableMap::DESCRIPTION, ContentI18nTableMap::CHAPO, ContentI18nTableMap::POSTSCRIPTUM, ContentI18nTableMap::META_TITLE, ContentI18nTableMap::META_DESCRIPTION, ContentI18nTableMap::META_KEYWORDS, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', 'CHAPO', 'POSTSCRIPTUM', 'META_TITLE', 'META_DESCRIPTION', 'META_KEYWORDS', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', 'meta_title', 'meta_description', 'meta_keywords', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -126,12 +141,12 @@ class ContentI18nTableMap 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(ContentI18nTableMap::ID => 0, ContentI18nTableMap::LOCALE => 1, ContentI18nTableMap::TITLE => 2, ContentI18nTableMap::DESCRIPTION => 3, ContentI18nTableMap::CHAPO => 4, ContentI18nTableMap::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, 'MetaKeywords' => 8, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, 'metaTitle' => 6, 'metaDescription' => 7, 'metaKeywords' => 8, ),
|
||||
self::TYPE_COLNAME => array(ContentI18nTableMap::ID => 0, ContentI18nTableMap::LOCALE => 1, ContentI18nTableMap::TITLE => 2, ContentI18nTableMap::DESCRIPTION => 3, ContentI18nTableMap::CHAPO => 4, ContentI18nTableMap::POSTSCRIPTUM => 5, ContentI18nTableMap::META_TITLE => 6, ContentI18nTableMap::META_DESCRIPTION => 7, ContentI18nTableMap::META_KEYWORDS => 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_KEYWORDS' => 8, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, 'meta_title' => 6, 'meta_description' => 7, 'meta_keywords' => 8, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -156,6 +171,9 @@ class ContentI18nTableMap 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_KEYWORDS', 'MetaKeywords', 'LONGVARCHAR', false, null, null);
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
@@ -359,6 +377,9 @@ class ContentI18nTableMap extends TableMap
|
||||
$criteria->addSelectColumn(ContentI18nTableMap::DESCRIPTION);
|
||||
$criteria->addSelectColumn(ContentI18nTableMap::CHAPO);
|
||||
$criteria->addSelectColumn(ContentI18nTableMap::POSTSCRIPTUM);
|
||||
$criteria->addSelectColumn(ContentI18nTableMap::META_TITLE);
|
||||
$criteria->addSelectColumn(ContentI18nTableMap::META_DESCRIPTION);
|
||||
$criteria->addSelectColumn(ContentI18nTableMap::META_KEYWORDS);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.LOCALE');
|
||||
@@ -366,6 +387,9 @@ class ContentI18nTableMap 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_KEYWORDS');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ class ContentTableMap 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_keywords', '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()
|
||||
|
||||
@@ -57,7 +57,7 @@ class FolderI18nTableMap 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 FolderI18nTableMap 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 FolderI18nTableMap extends TableMap
|
||||
*/
|
||||
const POSTSCRIPTUM = 'folder_i18n.POSTSCRIPTUM';
|
||||
|
||||
/**
|
||||
* the column name for the META_TITLE field
|
||||
*/
|
||||
const META_TITLE = 'folder_i18n.META_TITLE';
|
||||
|
||||
/**
|
||||
* the column name for the META_DESCRIPTION field
|
||||
*/
|
||||
const META_DESCRIPTION = 'folder_i18n.META_DESCRIPTION';
|
||||
|
||||
/**
|
||||
* the column name for the META_KEYWORDS field
|
||||
*/
|
||||
const META_KEYWORDS = 'folder_i18n.META_KEYWORDS';
|
||||
|
||||
/**
|
||||
* The default string format for model objects of the related table
|
||||
*/
|
||||
@@ -111,12 +126,12 @@ class FolderI18nTableMap 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(FolderI18nTableMap::ID, FolderI18nTableMap::LOCALE, FolderI18nTableMap::TITLE, FolderI18nTableMap::DESCRIPTION, FolderI18nTableMap::CHAPO, FolderI18nTableMap::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', 'MetaKeywords', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', 'metaTitle', 'metaDescription', 'metaKeywords', ),
|
||||
self::TYPE_COLNAME => array(FolderI18nTableMap::ID, FolderI18nTableMap::LOCALE, FolderI18nTableMap::TITLE, FolderI18nTableMap::DESCRIPTION, FolderI18nTableMap::CHAPO, FolderI18nTableMap::POSTSCRIPTUM, FolderI18nTableMap::META_TITLE, FolderI18nTableMap::META_DESCRIPTION, FolderI18nTableMap::META_KEYWORDS, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', 'CHAPO', 'POSTSCRIPTUM', 'META_TITLE', 'META_DESCRIPTION', 'META_KEYWORDS', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', 'meta_title', 'meta_description', 'meta_keywords', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -126,12 +141,12 @@ class FolderI18nTableMap 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(FolderI18nTableMap::ID => 0, FolderI18nTableMap::LOCALE => 1, FolderI18nTableMap::TITLE => 2, FolderI18nTableMap::DESCRIPTION => 3, FolderI18nTableMap::CHAPO => 4, FolderI18nTableMap::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, 'MetaKeywords' => 8, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, 'metaTitle' => 6, 'metaDescription' => 7, 'metaKeywords' => 8, ),
|
||||
self::TYPE_COLNAME => array(FolderI18nTableMap::ID => 0, FolderI18nTableMap::LOCALE => 1, FolderI18nTableMap::TITLE => 2, FolderI18nTableMap::DESCRIPTION => 3, FolderI18nTableMap::CHAPO => 4, FolderI18nTableMap::POSTSCRIPTUM => 5, FolderI18nTableMap::META_TITLE => 6, FolderI18nTableMap::META_DESCRIPTION => 7, FolderI18nTableMap::META_KEYWORDS => 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_KEYWORDS' => 8, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, 'meta_title' => 6, 'meta_description' => 7, 'meta_keywords' => 8, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -156,6 +171,9 @@ class FolderI18nTableMap 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_KEYWORDS', 'MetaKeywords', 'LONGVARCHAR', false, null, null);
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
@@ -359,6 +377,9 @@ class FolderI18nTableMap extends TableMap
|
||||
$criteria->addSelectColumn(FolderI18nTableMap::DESCRIPTION);
|
||||
$criteria->addSelectColumn(FolderI18nTableMap::CHAPO);
|
||||
$criteria->addSelectColumn(FolderI18nTableMap::POSTSCRIPTUM);
|
||||
$criteria->addSelectColumn(FolderI18nTableMap::META_TITLE);
|
||||
$criteria->addSelectColumn(FolderI18nTableMap::META_DESCRIPTION);
|
||||
$criteria->addSelectColumn(FolderI18nTableMap::META_KEYWORDS);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.LOCALE');
|
||||
@@ -366,6 +387,9 @@ class FolderI18nTableMap 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_KEYWORDS');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ class FolderTableMap 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_keywords', '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()
|
||||
|
||||
@@ -110,9 +110,9 @@ class ProductI18nTableMap extends TableMap
|
||||
const META_DESCRIPTION = 'product_i18n.META_DESCRIPTION';
|
||||
|
||||
/**
|
||||
* the column name for the META_KEYWORD field
|
||||
* the column name for the META_KEYWORDS field
|
||||
*/
|
||||
const META_KEYWORD = 'product_i18n.META_KEYWORD';
|
||||
const META_KEYWORDS = 'product_i18n.META_KEYWORDS';
|
||||
|
||||
/**
|
||||
* The default string format for model objects of the related table
|
||||
@@ -126,11 +126,11 @@ 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', '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_PHPNAME => array('Id', 'Locale', 'Title', 'Description', 'Chapo', 'Postscriptum', 'MetaTitle', 'MetaDescription', 'MetaKeywords', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', 'metaTitle', 'metaDescription', 'metaKeywords', ),
|
||||
self::TYPE_COLNAME => array(ProductI18nTableMap::ID, ProductI18nTableMap::LOCALE, ProductI18nTableMap::TITLE, ProductI18nTableMap::DESCRIPTION, ProductI18nTableMap::CHAPO, ProductI18nTableMap::POSTSCRIPTUM, ProductI18nTableMap::META_TITLE, ProductI18nTableMap::META_DESCRIPTION, ProductI18nTableMap::META_KEYWORDS, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', 'CHAPO', 'POSTSCRIPTUM', 'META_TITLE', 'META_DESCRIPTION', 'META_KEYWORDS', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', 'meta_title', 'meta_description', 'meta_keywords', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||
);
|
||||
|
||||
@@ -141,11 +141,11 @@ 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, '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_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Description' => 3, 'Chapo' => 4, 'Postscriptum' => 5, 'MetaTitle' => 6, 'MetaDescription' => 7, 'MetaKeywords' => 8, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, 'metaTitle' => 6, 'metaDescription' => 7, 'metaKeywords' => 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_KEYWORDS => 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_KEYWORDS' => 8, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, 'meta_title' => 6, 'meta_description' => 7, 'meta_keywords' => 8, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||
);
|
||||
|
||||
@@ -173,7 +173,7 @@ class ProductI18nTableMap extends TableMap
|
||||
$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);
|
||||
$this->addColumn('META_KEYWORDS', 'MetaKeywords', 'LONGVARCHAR', false, null, null);
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
@@ -379,7 +379,7 @@ class ProductI18nTableMap extends TableMap
|
||||
$criteria->addSelectColumn(ProductI18nTableMap::POSTSCRIPTUM);
|
||||
$criteria->addSelectColumn(ProductI18nTableMap::META_TITLE);
|
||||
$criteria->addSelectColumn(ProductI18nTableMap::META_DESCRIPTION);
|
||||
$criteria->addSelectColumn(ProductI18nTableMap::META_KEYWORD);
|
||||
$criteria->addSelectColumn(ProductI18nTableMap::META_KEYWORDS);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.LOCALE');
|
||||
@@ -389,7 +389,7 @@ class ProductI18nTableMap extends TableMap
|
||||
$criteria->addSelectColumn($alias . '.POSTSCRIPTUM');
|
||||
$criteria->addSelectColumn($alias . '.META_TITLE');
|
||||
$criteria->addSelectColumn($alias . '.META_DESCRIPTION');
|
||||
$criteria->addSelectColumn($alias . '.META_KEYWORD');
|
||||
$criteria->addSelectColumn($alias . '.META_KEYWORDS');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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, meta_title, meta_description, meta_keyword', '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_keywords', '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()
|
||||
|
||||
@@ -5,11 +5,14 @@ namespace Thelia\Model;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Thelia\Model\Base\Module as BaseModule;
|
||||
use Thelia\Model\Tools\ModelEventDispatcherTrait;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
|
||||
class Module extends BaseModule
|
||||
{
|
||||
use ModelEventDispatcherTrait;
|
||||
|
||||
use \Thelia\Model\Tools\PositionManagementTrait;
|
||||
|
||||
public function postSave(ConnectionInterface $con = null)
|
||||
{
|
||||
ModuleQuery::resetActivated();
|
||||
@@ -56,4 +59,30 @@ class Module extends BaseModule
|
||||
public function getAbsoluteI18nPath() {
|
||||
return THELIA_MODULE_DIR . $this->getI18nPath();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the absolute path to one of the module's template directories
|
||||
*
|
||||
* @param int $templateSubdirName the name of the, probably one of TemplateDefinition::xxx_SUBDIR constants
|
||||
*/
|
||||
public function getAbsoluteTemplateDirectoryPath($templateSubdirName) {
|
||||
return sprintf("%s%stemplates%s%s", $this->getAbsoluteBaseDir(), DS, DS, $templateSubdirName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate next position relative to module type
|
||||
*/
|
||||
protected function addCriteriaToPositionQuery($query) {
|
||||
$query->filterByType($this->getType());
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function preInsert(ConnectionInterface $con = null)
|
||||
{
|
||||
$this->setPosition($this->getNextPosition());
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
class ProductDocument extends BaseProductDocument
|
||||
{
|
||||
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
|
||||
use \Thelia\Model\Tools\PositionManagementTrait;
|
||||
|
||||
/**
|
||||
@@ -50,4 +51,14 @@ class ProductDocument extends BaseProductDocument
|
||||
return $this->getProductId();
|
||||
}
|
||||
|
||||
public function preDelete(ConnectionInterface $con = null)
|
||||
{
|
||||
$this->reorderBeforeDelete(
|
||||
array(
|
||||
"product_id" => $this->getProductId(),
|
||||
)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
class ProductImage extends BaseProductImage
|
||||
{
|
||||
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
|
||||
use \Thelia\Model\Tools\PositionManagementTrait;
|
||||
|
||||
/**
|
||||
@@ -49,4 +50,14 @@ class ProductImage extends BaseProductImage
|
||||
{
|
||||
return $this->getProductId();
|
||||
}
|
||||
|
||||
public function preDelete(ConnectionInterface $con = null)
|
||||
{
|
||||
$this->reorderBeforeDelete(
|
||||
array(
|
||||
"product_id" => $this->getProductId(),
|
||||
)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ class TaxRuleQuery extends BaseTaxRuleQuery
|
||||
->find()
|
||||
)
|
||||
->withColumn(TaxRuleCountryTableMap::POSITION, self::ALIAS_FOR_TAX_RULE_COUNTRY_POSITION)
|
||||
->orderBy(self::ALIAS_FOR_TAX_RULE_COUNTRY_POSITION, Criteria::ASC);
|
||||
;
|
||||
|
||||
return $search->find();
|
||||
|
||||
@@ -199,19 +199,26 @@ trait PositionManagementTrait {
|
||||
}
|
||||
}
|
||||
|
||||
protected function reorderBeforeDelete()
|
||||
protected function reorderBeforeDelete($fields = array())
|
||||
{
|
||||
// Find DATABASE_NAME constant
|
||||
$mapClassName = self::TABLE_MAP;
|
||||
|
||||
$sql = sprintf("UPDATE `%s` SET position=(position-1) WHERE parent=:parent AND position>:position", $mapClassName::TABLE_NAME);
|
||||
$data = array();
|
||||
$whereCriteria = array();
|
||||
|
||||
foreach($fields as $field => $value) {
|
||||
$whereCriteria[] = $field . '=:' . $field;
|
||||
$data[':' . $field] = $value;
|
||||
}
|
||||
|
||||
$data[':position'] = $this->getPosition();
|
||||
|
||||
$sql = sprintf("UPDATE `%s` SET position=(position-1) WHERE " . (count($whereCriteria)>0 ? implode(" AND ", $whereCriteria) : '1') . " AND position>:position", $mapClassName::TABLE_NAME);
|
||||
|
||||
$con = Propel::getConnection($mapClassName::DATABASE_NAME);
|
||||
$statement = $con->prepare($sql);
|
||||
|
||||
$statement->execute(array(
|
||||
':parent' => $this->getParent(),
|
||||
':position' => $this->getPosition()
|
||||
));
|
||||
$statement->execute($data);
|
||||
}
|
||||
}
|
||||
@@ -163,7 +163,7 @@ trait UrlRewritingTrait {
|
||||
public function setRewrittenUrl($locale, $url)
|
||||
{
|
||||
$currentUrl = $this->getRewrittenUrl($locale);
|
||||
if($currentUrl == $url) {
|
||||
if($currentUrl == $url || null === $url) {
|
||||
/* no url update */
|
||||
return $this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user