create Delivery loop
This commit is contained in:
@@ -89,6 +89,12 @@ abstract class Module implements ActiveRecordInterface
|
||||
*/
|
||||
protected $position;
|
||||
|
||||
/**
|
||||
* The value for the full_namespace field.
|
||||
* @var string
|
||||
*/
|
||||
protected $full_namespace;
|
||||
|
||||
/**
|
||||
* The value for the created_at field.
|
||||
* @var string
|
||||
@@ -456,6 +462,17 @@ abstract class Module implements ActiveRecordInterface
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [full_namespace] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFullNamespace()
|
||||
{
|
||||
|
||||
return $this->full_namespace;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [created_at] column value.
|
||||
*
|
||||
@@ -601,6 +618,27 @@ abstract class Module implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setPosition()
|
||||
|
||||
/**
|
||||
* Set the value of [full_namespace] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Module The current object (for fluent API support)
|
||||
*/
|
||||
public function setFullNamespace($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->full_namespace !== $v) {
|
||||
$this->full_namespace = $v;
|
||||
$this->modifiedColumns[] = ModuleTableMap::FULL_NAMESPACE;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setFullNamespace()
|
||||
|
||||
/**
|
||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||
*
|
||||
@@ -695,13 +733,16 @@ abstract class Module implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ModuleTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->position = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ModuleTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ModuleTableMap::translateFieldName('FullNamespace', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->full_namespace = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : ModuleTableMap::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 : ModuleTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : ModuleTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
@@ -714,7 +755,7 @@ abstract class Module implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 7; // 7 = ModuleTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 8; // 8 = ModuleTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\Module object", 0, $e);
|
||||
@@ -987,6 +1028,9 @@ abstract class Module implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(ModuleTableMap::POSITION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'POSITION';
|
||||
}
|
||||
if ($this->isColumnModified(ModuleTableMap::FULL_NAMESPACE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'FULL_NAMESPACE';
|
||||
}
|
||||
if ($this->isColumnModified(ModuleTableMap::CREATED_AT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
|
||||
}
|
||||
@@ -1019,6 +1063,9 @@ abstract class Module implements ActiveRecordInterface
|
||||
case 'POSITION':
|
||||
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
|
||||
break;
|
||||
case 'FULL_NAMESPACE':
|
||||
$stmt->bindValue($identifier, $this->full_namespace, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'CREATED_AT':
|
||||
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
||||
break;
|
||||
@@ -1103,9 +1150,12 @@ abstract class Module implements ActiveRecordInterface
|
||||
return $this->getPosition();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getCreatedAt();
|
||||
return $this->getFullNamespace();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
default:
|
||||
@@ -1142,8 +1192,9 @@ abstract class Module implements ActiveRecordInterface
|
||||
$keys[2] => $this->getType(),
|
||||
$keys[3] => $this->getActivate(),
|
||||
$keys[4] => $this->getPosition(),
|
||||
$keys[5] => $this->getCreatedAt(),
|
||||
$keys[6] => $this->getUpdatedAt(),
|
||||
$keys[5] => $this->getFullNamespace(),
|
||||
$keys[6] => $this->getCreatedAt(),
|
||||
$keys[7] => $this->getUpdatedAt(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1208,9 +1259,12 @@ abstract class Module implements ActiveRecordInterface
|
||||
$this->setPosition($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setCreatedAt($value);
|
||||
$this->setFullNamespace($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1242,8 +1296,9 @@ abstract class Module implements ActiveRecordInterface
|
||||
if (array_key_exists($keys[2], $arr)) $this->setType($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setActivate($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[5], $arr)) $this->setFullNamespace($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setCreatedAt($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setUpdatedAt($arr[$keys[7]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1260,6 +1315,7 @@ abstract class Module implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(ModuleTableMap::TYPE)) $criteria->add(ModuleTableMap::TYPE, $this->type);
|
||||
if ($this->isColumnModified(ModuleTableMap::ACTIVATE)) $criteria->add(ModuleTableMap::ACTIVATE, $this->activate);
|
||||
if ($this->isColumnModified(ModuleTableMap::POSITION)) $criteria->add(ModuleTableMap::POSITION, $this->position);
|
||||
if ($this->isColumnModified(ModuleTableMap::FULL_NAMESPACE)) $criteria->add(ModuleTableMap::FULL_NAMESPACE, $this->full_namespace);
|
||||
if ($this->isColumnModified(ModuleTableMap::CREATED_AT)) $criteria->add(ModuleTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(ModuleTableMap::UPDATED_AT)) $criteria->add(ModuleTableMap::UPDATED_AT, $this->updated_at);
|
||||
|
||||
@@ -1329,6 +1385,7 @@ abstract class Module implements ActiveRecordInterface
|
||||
$copyObj->setType($this->getType());
|
||||
$copyObj->setActivate($this->getActivate());
|
||||
$copyObj->setPosition($this->getPosition());
|
||||
$copyObj->setFullNamespace($this->getFullNamespace());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
|
||||
@@ -1876,6 +1933,7 @@ abstract class Module implements ActiveRecordInterface
|
||||
$this->type = null;
|
||||
$this->activate = null;
|
||||
$this->position = null;
|
||||
$this->full_namespace = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
$this->alreadyInSave = false;
|
||||
|
||||
@@ -27,6 +27,7 @@ use Thelia\Model\Map\ModuleTableMap;
|
||||
* @method ChildModuleQuery orderByType($order = Criteria::ASC) Order by the type column
|
||||
* @method ChildModuleQuery orderByActivate($order = Criteria::ASC) Order by the activate column
|
||||
* @method ChildModuleQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildModuleQuery orderByFullNamespace($order = Criteria::ASC) Order by the full_namespace column
|
||||
* @method ChildModuleQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildModuleQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
@@ -35,6 +36,7 @@ use Thelia\Model\Map\ModuleTableMap;
|
||||
* @method ChildModuleQuery groupByType() Group by the type column
|
||||
* @method ChildModuleQuery groupByActivate() Group by the activate column
|
||||
* @method ChildModuleQuery groupByPosition() Group by the position column
|
||||
* @method ChildModuleQuery groupByFullNamespace() Group by the full_namespace column
|
||||
* @method ChildModuleQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildModuleQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
@@ -58,6 +60,7 @@ use Thelia\Model\Map\ModuleTableMap;
|
||||
* @method ChildModule findOneByType(int $type) Return the first ChildModule filtered by the type column
|
||||
* @method ChildModule findOneByActivate(int $activate) Return the first ChildModule filtered by the activate column
|
||||
* @method ChildModule findOneByPosition(int $position) Return the first ChildModule filtered by the position column
|
||||
* @method ChildModule findOneByFullNamespace(string $full_namespace) Return the first ChildModule filtered by the full_namespace column
|
||||
* @method ChildModule findOneByCreatedAt(string $created_at) Return the first ChildModule filtered by the created_at column
|
||||
* @method ChildModule findOneByUpdatedAt(string $updated_at) Return the first ChildModule filtered by the updated_at column
|
||||
*
|
||||
@@ -66,6 +69,7 @@ use Thelia\Model\Map\ModuleTableMap;
|
||||
* @method array findByType(int $type) Return ChildModule objects filtered by the type column
|
||||
* @method array findByActivate(int $activate) Return ChildModule objects filtered by the activate column
|
||||
* @method array findByPosition(int $position) Return ChildModule objects filtered by the position column
|
||||
* @method array findByFullNamespace(string $full_namespace) Return ChildModule objects filtered by the full_namespace column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildModule objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildModule objects filtered by the updated_at column
|
||||
*
|
||||
@@ -156,7 +160,7 @@ abstract class ModuleQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, CODE, TYPE, ACTIVATE, POSITION, CREATED_AT, UPDATED_AT FROM module WHERE ID = :p0';
|
||||
$sql = 'SELECT ID, CODE, TYPE, ACTIVATE, POSITION, FULL_NAMESPACE, CREATED_AT, UPDATED_AT FROM module WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -438,6 +442,35 @@ abstract class ModuleQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(ModuleTableMap::POSITION, $position, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the full_namespace column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByFullNamespace('fooValue'); // WHERE full_namespace = 'fooValue'
|
||||
* $query->filterByFullNamespace('%fooValue%'); // WHERE full_namespace LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $fullNamespace 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 ChildModuleQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByFullNamespace($fullNamespace = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($fullNamespace)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $fullNamespace)) {
|
||||
$fullNamespace = str_replace('*', '%', $fullNamespace);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ModuleTableMap::FULL_NAMESPACE, $fullNamespace, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user