category link last stand
This commit is contained in:
@@ -92,12 +92,6 @@ abstract class Category implements ActiveRecordInterface
|
||||
*/
|
||||
protected $parent;
|
||||
|
||||
/**
|
||||
* The value for the link field.
|
||||
* @var string
|
||||
*/
|
||||
protected $link;
|
||||
|
||||
/**
|
||||
* The value for the visible field.
|
||||
* @var int
|
||||
@@ -601,17 +595,6 @@ abstract class Category implements ActiveRecordInterface
|
||||
return $this->parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [link] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLink()
|
||||
{
|
||||
|
||||
return $this->link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [visible] column value.
|
||||
*
|
||||
@@ -758,27 +741,6 @@ abstract class Category implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setParent()
|
||||
|
||||
/**
|
||||
* Set the value of [link] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Category The current object (for fluent API support)
|
||||
*/
|
||||
public function setLink($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->link !== $v) {
|
||||
$this->link = $v;
|
||||
$this->modifiedColumns[] = CategoryTableMap::LINK;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setLink()
|
||||
|
||||
/**
|
||||
* Set the value of [visible] column.
|
||||
*
|
||||
@@ -973,37 +935,34 @@ abstract class Category implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CategoryTableMap::translateFieldName('Parent', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->parent = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CategoryTableMap::translateFieldName('Link', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->link = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CategoryTableMap::translateFieldName('Visible', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CategoryTableMap::translateFieldName('Visible', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->visible = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CategoryTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CategoryTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->position = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CategoryTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CategoryTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CategoryTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CategoryTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CategoryTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CategoryTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CategoryTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CategoryTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CategoryTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CategoryTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version_created_by = (null !== $col) ? (string) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
@@ -1013,7 +972,7 @@ abstract class Category implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 10; // 10 = CategoryTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 9; // 9 = CategoryTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\Category object", 0, $e);
|
||||
@@ -1506,9 +1465,6 @@ abstract class Category implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CategoryTableMap::PARENT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'PARENT';
|
||||
}
|
||||
if ($this->isColumnModified(CategoryTableMap::LINK)) {
|
||||
$modifiedColumns[':p' . $index++] = 'LINK';
|
||||
}
|
||||
if ($this->isColumnModified(CategoryTableMap::VISIBLE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'VISIBLE';
|
||||
}
|
||||
@@ -1547,9 +1503,6 @@ abstract class Category implements ActiveRecordInterface
|
||||
case 'PARENT':
|
||||
$stmt->bindValue($identifier, $this->parent, PDO::PARAM_INT);
|
||||
break;
|
||||
case 'LINK':
|
||||
$stmt->bindValue($identifier, $this->link, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'VISIBLE':
|
||||
$stmt->bindValue($identifier, $this->visible, PDO::PARAM_INT);
|
||||
break;
|
||||
@@ -1640,27 +1593,24 @@ abstract class Category implements ActiveRecordInterface
|
||||
return $this->getParent();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getLink();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getVisible();
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
return $this->getPosition();
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
return $this->getVersion();
|
||||
break;
|
||||
case 8:
|
||||
case 7:
|
||||
return $this->getVersionCreatedAt();
|
||||
break;
|
||||
case 9:
|
||||
case 8:
|
||||
return $this->getVersionCreatedBy();
|
||||
break;
|
||||
default:
|
||||
@@ -1694,14 +1644,13 @@ abstract class Category implements ActiveRecordInterface
|
||||
$result = array(
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getParent(),
|
||||
$keys[2] => $this->getLink(),
|
||||
$keys[3] => $this->getVisible(),
|
||||
$keys[4] => $this->getPosition(),
|
||||
$keys[5] => $this->getCreatedAt(),
|
||||
$keys[6] => $this->getUpdatedAt(),
|
||||
$keys[7] => $this->getVersion(),
|
||||
$keys[8] => $this->getVersionCreatedAt(),
|
||||
$keys[9] => $this->getVersionCreatedBy(),
|
||||
$keys[2] => $this->getVisible(),
|
||||
$keys[3] => $this->getPosition(),
|
||||
$keys[4] => $this->getCreatedAt(),
|
||||
$keys[5] => $this->getUpdatedAt(),
|
||||
$keys[6] => $this->getVersion(),
|
||||
$keys[7] => $this->getVersionCreatedAt(),
|
||||
$keys[8] => $this->getVersionCreatedBy(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1778,27 +1727,24 @@ abstract class Category implements ActiveRecordInterface
|
||||
$this->setParent($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setLink($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setVisible($value);
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
$this->setPosition($value);
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
$this->setVersion($value);
|
||||
break;
|
||||
case 8:
|
||||
case 7:
|
||||
$this->setVersionCreatedAt($value);
|
||||
break;
|
||||
case 9:
|
||||
case 8:
|
||||
$this->setVersionCreatedBy($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1827,14 +1773,13 @@ abstract class Category implements ActiveRecordInterface
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setParent($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setLink($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setVisible($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setPosition($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setVersion($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setVersionCreatedAt($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setVersionCreatedBy($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setVisible($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setPosition($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setVersion($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setVersionCreatedAt($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setVersionCreatedBy($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1848,7 +1793,6 @@ abstract class Category implements ActiveRecordInterface
|
||||
|
||||
if ($this->isColumnModified(CategoryTableMap::ID)) $criteria->add(CategoryTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(CategoryTableMap::PARENT)) $criteria->add(CategoryTableMap::PARENT, $this->parent);
|
||||
if ($this->isColumnModified(CategoryTableMap::LINK)) $criteria->add(CategoryTableMap::LINK, $this->link);
|
||||
if ($this->isColumnModified(CategoryTableMap::VISIBLE)) $criteria->add(CategoryTableMap::VISIBLE, $this->visible);
|
||||
if ($this->isColumnModified(CategoryTableMap::POSITION)) $criteria->add(CategoryTableMap::POSITION, $this->position);
|
||||
if ($this->isColumnModified(CategoryTableMap::CREATED_AT)) $criteria->add(CategoryTableMap::CREATED_AT, $this->created_at);
|
||||
@@ -1920,7 +1864,6 @@ abstract class Category implements ActiveRecordInterface
|
||||
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
|
||||
{
|
||||
$copyObj->setParent($this->getParent());
|
||||
$copyObj->setLink($this->getLink());
|
||||
$copyObj->setVisible($this->getVisible());
|
||||
$copyObj->setPosition($this->getPosition());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
@@ -4939,7 +4882,6 @@ abstract class Category implements ActiveRecordInterface
|
||||
{
|
||||
$this->id = null;
|
||||
$this->parent = null;
|
||||
$this->link = null;
|
||||
$this->visible = null;
|
||||
$this->position = null;
|
||||
$this->created_at = null;
|
||||
@@ -5352,7 +5294,6 @@ abstract class Category implements ActiveRecordInterface
|
||||
$version = new ChildCategoryVersion();
|
||||
$version->setId($this->getId());
|
||||
$version->setParent($this->getParent());
|
||||
$version->setLink($this->getLink());
|
||||
$version->setVisible($this->getVisible());
|
||||
$version->setPosition($this->getPosition());
|
||||
$version->setCreatedAt($this->getCreatedAt());
|
||||
@@ -5399,7 +5340,6 @@ abstract class Category implements ActiveRecordInterface
|
||||
$loadedObjects['ChildCategory'][$version->getId()][$version->getVersion()] = $this;
|
||||
$this->setId($version->getId());
|
||||
$this->setParent($version->getParent());
|
||||
$this->setLink($version->getLink());
|
||||
$this->setVisible($version->getVisible());
|
||||
$this->setPosition($version->getPosition());
|
||||
$this->setCreatedAt($version->getCreatedAt());
|
||||
|
||||
@@ -24,7 +24,6 @@ use Thelia\Model\Map\CategoryTableMap;
|
||||
*
|
||||
* @method ChildCategoryQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildCategoryQuery orderByParent($order = Criteria::ASC) Order by the parent column
|
||||
* @method ChildCategoryQuery orderByLink($order = Criteria::ASC) Order by the link column
|
||||
* @method ChildCategoryQuery orderByVisible($order = Criteria::ASC) Order by the visible column
|
||||
* @method ChildCategoryQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildCategoryQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
@@ -35,7 +34,6 @@ use Thelia\Model\Map\CategoryTableMap;
|
||||
*
|
||||
* @method ChildCategoryQuery groupById() Group by the id column
|
||||
* @method ChildCategoryQuery groupByParent() Group by the parent column
|
||||
* @method ChildCategoryQuery groupByLink() Group by the link column
|
||||
* @method ChildCategoryQuery groupByVisible() Group by the visible column
|
||||
* @method ChildCategoryQuery groupByPosition() Group by the position column
|
||||
* @method ChildCategoryQuery groupByCreatedAt() Group by the created_at column
|
||||
@@ -89,7 +87,6 @@ use Thelia\Model\Map\CategoryTableMap;
|
||||
*
|
||||
* @method ChildCategory findOneById(int $id) Return the first ChildCategory filtered by the id column
|
||||
* @method ChildCategory findOneByParent(int $parent) Return the first ChildCategory filtered by the parent column
|
||||
* @method ChildCategory findOneByLink(string $link) Return the first ChildCategory filtered by the link column
|
||||
* @method ChildCategory findOneByVisible(int $visible) Return the first ChildCategory filtered by the visible column
|
||||
* @method ChildCategory findOneByPosition(int $position) Return the first ChildCategory filtered by the position column
|
||||
* @method ChildCategory findOneByCreatedAt(string $created_at) Return the first ChildCategory filtered by the created_at column
|
||||
@@ -100,7 +97,6 @@ use Thelia\Model\Map\CategoryTableMap;
|
||||
*
|
||||
* @method array findById(int $id) Return ChildCategory objects filtered by the id column
|
||||
* @method array findByParent(int $parent) Return ChildCategory objects filtered by the parent column
|
||||
* @method array findByLink(string $link) Return ChildCategory objects filtered by the link column
|
||||
* @method array findByVisible(int $visible) Return ChildCategory objects filtered by the visible column
|
||||
* @method array findByPosition(int $position) Return ChildCategory objects filtered by the position column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildCategory objects filtered by the created_at column
|
||||
@@ -203,7 +199,7 @@ abstract class CategoryQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, PARENT, LINK, VISIBLE, POSITION, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM category WHERE ID = :p0';
|
||||
$sql = 'SELECT ID, PARENT, VISIBLE, POSITION, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM category WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -374,35 +370,6 @@ abstract class CategoryQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CategoryTableMap::PARENT, $parent, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the link column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByLink('fooValue'); // WHERE link = 'fooValue'
|
||||
* $query->filterByLink('%fooValue%'); // WHERE link LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $link 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 ChildCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByLink($link = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($link)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $link)) {
|
||||
$link = str_replace('*', '%', $link);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CategoryTableMap::LINK, $link, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the visible column
|
||||
*
|
||||
|
||||
@@ -67,12 +67,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
*/
|
||||
protected $parent;
|
||||
|
||||
/**
|
||||
* The value for the link field.
|
||||
* @var string
|
||||
*/
|
||||
protected $link;
|
||||
|
||||
/**
|
||||
* The value for the visible field.
|
||||
* @var int
|
||||
@@ -418,17 +412,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
return $this->parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [link] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLink()
|
||||
{
|
||||
|
||||
return $this->link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [visible] column value.
|
||||
*
|
||||
@@ -579,27 +562,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setParent()
|
||||
|
||||
/**
|
||||
* Set the value of [link] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CategoryVersion The current object (for fluent API support)
|
||||
*/
|
||||
public function setLink($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->link !== $v) {
|
||||
$this->link = $v;
|
||||
$this->modifiedColumns[] = CategoryVersionTableMap::LINK;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setLink()
|
||||
|
||||
/**
|
||||
* Set the value of [visible] column.
|
||||
*
|
||||
@@ -794,37 +756,34 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CategoryVersionTableMap::translateFieldName('Parent', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->parent = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CategoryVersionTableMap::translateFieldName('Link', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->link = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CategoryVersionTableMap::translateFieldName('Visible', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CategoryVersionTableMap::translateFieldName('Visible', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->visible = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CategoryVersionTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CategoryVersionTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->position = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CategoryVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CategoryVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CategoryVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CategoryVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CategoryVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CategoryVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CategoryVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CategoryVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CategoryVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CategoryVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version_created_by = (null !== $col) ? (string) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
@@ -834,7 +793,7 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 10; // 10 = CategoryVersionTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 9; // 9 = CategoryVersionTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\CategoryVersion object", 0, $e);
|
||||
@@ -1061,9 +1020,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CategoryVersionTableMap::PARENT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'PARENT';
|
||||
}
|
||||
if ($this->isColumnModified(CategoryVersionTableMap::LINK)) {
|
||||
$modifiedColumns[':p' . $index++] = 'LINK';
|
||||
}
|
||||
if ($this->isColumnModified(CategoryVersionTableMap::VISIBLE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'VISIBLE';
|
||||
}
|
||||
@@ -1102,9 +1058,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
case 'PARENT':
|
||||
$stmt->bindValue($identifier, $this->parent, PDO::PARAM_INT);
|
||||
break;
|
||||
case 'LINK':
|
||||
$stmt->bindValue($identifier, $this->link, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'VISIBLE':
|
||||
$stmt->bindValue($identifier, $this->visible, PDO::PARAM_INT);
|
||||
break;
|
||||
@@ -1188,27 +1141,24 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
return $this->getParent();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getLink();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getVisible();
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
return $this->getPosition();
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
return $this->getVersion();
|
||||
break;
|
||||
case 8:
|
||||
case 7:
|
||||
return $this->getVersionCreatedAt();
|
||||
break;
|
||||
case 9:
|
||||
case 8:
|
||||
return $this->getVersionCreatedBy();
|
||||
break;
|
||||
default:
|
||||
@@ -1242,14 +1192,13 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
$result = array(
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getParent(),
|
||||
$keys[2] => $this->getLink(),
|
||||
$keys[3] => $this->getVisible(),
|
||||
$keys[4] => $this->getPosition(),
|
||||
$keys[5] => $this->getCreatedAt(),
|
||||
$keys[6] => $this->getUpdatedAt(),
|
||||
$keys[7] => $this->getVersion(),
|
||||
$keys[8] => $this->getVersionCreatedAt(),
|
||||
$keys[9] => $this->getVersionCreatedBy(),
|
||||
$keys[2] => $this->getVisible(),
|
||||
$keys[3] => $this->getPosition(),
|
||||
$keys[4] => $this->getCreatedAt(),
|
||||
$keys[5] => $this->getUpdatedAt(),
|
||||
$keys[6] => $this->getVersion(),
|
||||
$keys[7] => $this->getVersionCreatedAt(),
|
||||
$keys[8] => $this->getVersionCreatedBy(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1302,27 +1251,24 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
$this->setParent($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setLink($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setVisible($value);
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
$this->setPosition($value);
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
$this->setVersion($value);
|
||||
break;
|
||||
case 8:
|
||||
case 7:
|
||||
$this->setVersionCreatedAt($value);
|
||||
break;
|
||||
case 9:
|
||||
case 8:
|
||||
$this->setVersionCreatedBy($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1351,14 +1297,13 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setParent($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setLink($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setVisible($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setPosition($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setVersion($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setVersionCreatedAt($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setVersionCreatedBy($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setVisible($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setPosition($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setVersion($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setVersionCreatedAt($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setVersionCreatedBy($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1372,7 +1317,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
|
||||
if ($this->isColumnModified(CategoryVersionTableMap::ID)) $criteria->add(CategoryVersionTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(CategoryVersionTableMap::PARENT)) $criteria->add(CategoryVersionTableMap::PARENT, $this->parent);
|
||||
if ($this->isColumnModified(CategoryVersionTableMap::LINK)) $criteria->add(CategoryVersionTableMap::LINK, $this->link);
|
||||
if ($this->isColumnModified(CategoryVersionTableMap::VISIBLE)) $criteria->add(CategoryVersionTableMap::VISIBLE, $this->visible);
|
||||
if ($this->isColumnModified(CategoryVersionTableMap::POSITION)) $criteria->add(CategoryVersionTableMap::POSITION, $this->position);
|
||||
if ($this->isColumnModified(CategoryVersionTableMap::CREATED_AT)) $criteria->add(CategoryVersionTableMap::CREATED_AT, $this->created_at);
|
||||
@@ -1452,7 +1396,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
{
|
||||
$copyObj->setId($this->getId());
|
||||
$copyObj->setParent($this->getParent());
|
||||
$copyObj->setLink($this->getLink());
|
||||
$copyObj->setVisible($this->getVisible());
|
||||
$copyObj->setPosition($this->getPosition());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
@@ -1545,7 +1488,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
|
||||
{
|
||||
$this->id = null;
|
||||
$this->parent = null;
|
||||
$this->link = null;
|
||||
$this->visible = null;
|
||||
$this->position = null;
|
||||
$this->created_at = null;
|
||||
|
||||
@@ -23,7 +23,6 @@ use Thelia\Model\Map\CategoryVersionTableMap;
|
||||
*
|
||||
* @method ChildCategoryVersionQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildCategoryVersionQuery orderByParent($order = Criteria::ASC) Order by the parent column
|
||||
* @method ChildCategoryVersionQuery orderByLink($order = Criteria::ASC) Order by the link column
|
||||
* @method ChildCategoryVersionQuery orderByVisible($order = Criteria::ASC) Order by the visible column
|
||||
* @method ChildCategoryVersionQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildCategoryVersionQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
@@ -34,7 +33,6 @@ use Thelia\Model\Map\CategoryVersionTableMap;
|
||||
*
|
||||
* @method ChildCategoryVersionQuery groupById() Group by the id column
|
||||
* @method ChildCategoryVersionQuery groupByParent() Group by the parent column
|
||||
* @method ChildCategoryVersionQuery groupByLink() Group by the link column
|
||||
* @method ChildCategoryVersionQuery groupByVisible() Group by the visible column
|
||||
* @method ChildCategoryVersionQuery groupByPosition() Group by the position column
|
||||
* @method ChildCategoryVersionQuery groupByCreatedAt() Group by the created_at column
|
||||
@@ -56,7 +54,6 @@ use Thelia\Model\Map\CategoryVersionTableMap;
|
||||
*
|
||||
* @method ChildCategoryVersion findOneById(int $id) Return the first ChildCategoryVersion filtered by the id column
|
||||
* @method ChildCategoryVersion findOneByParent(int $parent) Return the first ChildCategoryVersion filtered by the parent column
|
||||
* @method ChildCategoryVersion findOneByLink(string $link) Return the first ChildCategoryVersion filtered by the link column
|
||||
* @method ChildCategoryVersion findOneByVisible(int $visible) Return the first ChildCategoryVersion filtered by the visible column
|
||||
* @method ChildCategoryVersion findOneByPosition(int $position) Return the first ChildCategoryVersion filtered by the position column
|
||||
* @method ChildCategoryVersion findOneByCreatedAt(string $created_at) Return the first ChildCategoryVersion filtered by the created_at column
|
||||
@@ -67,7 +64,6 @@ use Thelia\Model\Map\CategoryVersionTableMap;
|
||||
*
|
||||
* @method array findById(int $id) Return ChildCategoryVersion objects filtered by the id column
|
||||
* @method array findByParent(int $parent) Return ChildCategoryVersion objects filtered by the parent column
|
||||
* @method array findByLink(string $link) Return ChildCategoryVersion objects filtered by the link column
|
||||
* @method array findByVisible(int $visible) Return ChildCategoryVersion objects filtered by the visible column
|
||||
* @method array findByPosition(int $position) Return ChildCategoryVersion objects filtered by the position column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildCategoryVersion objects filtered by the created_at column
|
||||
@@ -163,7 +159,7 @@ abstract class CategoryVersionQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, PARENT, LINK, VISIBLE, POSITION, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM category_version WHERE ID = :p0 AND VERSION = :p1';
|
||||
$sql = 'SELECT ID, PARENT, VISIBLE, POSITION, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM category_version WHERE ID = :p0 AND VERSION = :p1';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||
@@ -348,35 +344,6 @@ abstract class CategoryVersionQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CategoryVersionTableMap::PARENT, $parent, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the link column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByLink('fooValue'); // WHERE link = 'fooValue'
|
||||
* $query->filterByLink('%fooValue%'); // WHERE link LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $link 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 ChildCategoryVersionQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByLink($link = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($link)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $link)) {
|
||||
$link = str_replace('*', '%', $link);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CategoryVersionTableMap::LINK, $link, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the visible column
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user