Continue import export management

modifié:         core/lib/Thelia/Config/Resources/loop.xml
	nouveau fichier: core/lib/Thelia/Core/Template/Loop/ImportExportCategory.php
	nouveau fichier: core/lib/Thelia/Core/Template/Loop/ImportExportType.php
	nouveau fichier: core/lib/Thelia/Form/ExportForm.php
	modifié:         core/lib/Thelia/Model/Base/ImportExportType.php
	modifié:         core/lib/Thelia/Model/Base/ImportExportTypeQuery.php
	modifié:         core/lib/Thelia/Model/Map/ImportExportTypeTableMap.php
	modifié:         local/config/schema.xml
	modifié:         setup/thelia.sql
	modifié:         templates/backOffice/default/export.html
This commit is contained in:
Benjamin Perche
2014-07-09 16:48:04 +02:00
parent 5a6ede991b
commit 0cb0e89382
10 changed files with 495 additions and 45 deletions

View File

@@ -57,6 +57,7 @@
<loop class="Thelia\Core\Template\Loop\TaxRuleCountry" name="tax-rule-country"/>
<loop class="Thelia\Core\Template\Loop\Formatter" name="formatter" />
<loop class="Thelia\Core\Template\Loop\ArchiveBuilder" name="archive-builder" />
<loop class="Thelia\Core\Template\Loop\ImportExportCategory" name="import-export-category" />
</loops>

View File

@@ -0,0 +1,136 @@
<?php
/*************************************************************************************/
/* This file is part of the Thelia package. */
/* */
/* Copyright (c) OpenStudio */
/* email : dev@thelia.net */
/* web : http://www.thelia.net */
/* */
/* For the full copyright and license information, please view the LICENSE.txt */
/* file that was distributed with this source code. */
/*************************************************************************************/
namespace Thelia\Core\Template\Loop;
use Propel\Runtime\ActiveQuery\Criteria;
use Thelia\Core\Template\Element\BaseLoop;
use Thelia\Core\Template\Element\LoopResult;
use Thelia\Core\Template\Element\LoopResultRow;
use Thelia\Core\Template\Element\PropelSearchLoopInterface;
use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Model\Base\ImportExportCategoryQuery;
use Thelia\Type\EnumListType;
use Thelia\Type\TypeCollection;
/**
* Class ImportExportCategory
* @package Thelia\Core\Template\Loop
* @author Benjamin Perche <bperche@openstudio.fr>
*/
class ImportExportCategory extends BaseLoop implements PropelSearchLoopInterface
{
protected $timestampable = true;
/**
* @param LoopResult $loopResult
*
* @return LoopResult
*/
public function parseResults(LoopResult $loopResult)
{
/** @var \Thelia\Model\ImportExportCategory $category */
foreach ($loopResult->getResultDataCollection() as $category)
{
$loopResultRow = new LoopResultRow($category);
$loopResultRow
->set("ID", $category->getId())
->set("TITLE", $category->getTitle())
->set("POSITION", $category->getPosition())
;
$loopResult->addRow($loopResultRow);
}
return $loopResult;
}
/**
* this method returns a Propel ModelCriteria
*
* @return \Propel\Runtime\ActiveQuery\ModelCriteria
*/
public function buildModelCriteria()
{
$query = ImportExportCategoryQuery::create();
if (null !== $ids = $this->getId()) {
$query->filterById($ids, Criteria::IN);
}
if (null !== $orders = $this->getOrder()) {
foreach ($orders as $order) {
switch($order) {
case "id":
$query->orderById();
break;
case "id_reverse":
$query->orderById(Criteria::DESC);
break;
case "alpha":
$query->addAscendingOrderByColumn("i18n_TITLE");
break;
case "alpha_reverse":
$query->addDescendingOrderByColumn("i18n_TITLE");
break;
case "manual":
$query->orderByPosition();
break;
case "manual_reverse":
$query->orderByPosition(Criteria::DESC);
break;
}
}
}
return $query;
}
/**
* Definition of loop arguments
*
* example :
*
* public function getArgDefinitions()
* {
* return new ArgumentCollection(
*
* Argument::createIntListTypeArgument('id'),
* new Argument(
* 'ref',
* new TypeCollection(
* new Type\AlphaNumStringListType()
* )
* ),
* Argument::createIntListTypeArgument('category'),
* Argument::createBooleanTypeArgument('new'),
* ...
* );
* }
*
* @return \Thelia\Core\Template\Loop\Argument\ArgumentCollection
*/
protected function getArgDefinitions()
{
return new ArgumentCollection(
Argument::createIntListTypeArgument('id'),
new Argument(
"order",
new TypeCollection(
new EnumListType(["id", "id_reverse", "alpha", "alpha_reverse", "manual", "manual_reverse"])
),
"manual"
)
);
}
}

View File

@@ -0,0 +1,87 @@
<?php
/*************************************************************************************/
/* This file is part of the Thelia package. */
/* */
/* Copyright (c) OpenStudio */
/* email : dev@thelia.net */
/* web : http://www.thelia.net */
/* */
/* For the full copyright and license information, please view the LICENSE.txt */
/* file that was distributed with this source code. */
/*************************************************************************************/
namespace Thelia\Core\Template\Loop;
use Thelia\Core\Template\Element\BaseLoop;
use Thelia\Core\Template\Element\LoopResult;
use Thelia\Core\Template\Element\PropelSearchLoopInterface;
use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Type\EnumListType;
use Thelia\Type\TypeCollection;
/**
* Class ImportExportType
* @package Thelia\Core\Template\Loop
* @author Benjamin Perche <bperche@openstudio.fr>
*/
class ImportExportType extends BaseLoop implements PropelSearchLoopInterface
{
/**
* @param LoopResult $loopResult
*
* @return LoopResult
*/
public function parseResults(LoopResult $loopResult)
{
// TODO: Implement parseResults() method.
}
/**
* this method returns a Propel ModelCriteria
*
* @return \Propel\Runtime\ActiveQuery\ModelCriteria
*/
public function buildModelCriteria()
{
// TODO: Implement buildModelCriteria() method.
}
/**
* Definition of loop arguments
*
* example :
*
* public function getArgDefinitions()
* {
* return new ArgumentCollection(
*
* Argument::createIntListTypeArgument('id'),
* new Argument(
* 'ref',
* new TypeCollection(
* new Type\AlphaNumStringListType()
* )
* ),
* Argument::createIntListTypeArgument('category'),
* Argument::createBooleanTypeArgument('new'),
* ...
* );
* }
*
* @return \Thelia\Core\Template\Loop\Argument\ArgumentCollection
*/
protected function getArgDefinitions()
{
return new ArgumentCollection(
Argument::createIntListTypeArgument('id'),
new Argument(
"order",
new TypeCollection(
new EnumListType(["id", "id_reverse", "alpha", "alpha_reverse", "manual", "manual_reverse"])
),
"manual"
)
);
}
}

View File

@@ -0,0 +1,99 @@
<?php
/*************************************************************************************/
/* This file is part of the Thelia package. */
/* */
/* Copyright (c) OpenStudio */
/* email : dev@thelia.net */
/* web : http://www.thelia.net */
/* */
/* For the full copyright and license information, please view the LICENSE.txt */
/* file that was distributed with this source code. */
/*************************************************************************************/
namespace Thelia\Form;
use Thelia\Core\HttpFoundation\Request;
use Thelia\Core\Translation\Translator;
use Thelia\Form\BaseForm;
/**
* Class ExportForm
* @package Thelia\Form
* @author Benjamin Perche <bperche@openstudio.fr>
*/
class ExportForm extends BaseForm
{
protected $archiveBuilderManager = array();
protected $formattersNames = array();
protected $exportTypes = array();
protected $translator;
public function __construct(Request $request, $type= "form", $data = array(), $options = array())
{
$this->translator = Translator::getInstance();
parent::__construct($request, $type, $data, $options);
}
protected function buildForm()
{
$this->formBuilder
->add("formatter", "choice", array(
"label" => $this->translator->trans("File format"),
"label_attr" => ["for" => "formatter"],
"required" => true,
"multiple" => false,
"choices" => $this->formattersNames,
))
->add("archive_builder", "choice", array(
"label" => $this->translator->trans("Archive Format"),
"label_attr" => ["for" => "archive_builder"],
"required" => true,
"multiple" => false,
"choices" => $this->archiveBuilderManager,
))
->add("images", "checkbox", array(
"label" => $this->translator->trans("Include images"),
"label_attr" => ["for" => "with_images"],
"required" => false,
))
->add("documents", "checkbox", array(
"label" => $this->translator->trans("Include documents"),
"label_attr" => ["for" => "with_documents"],
"required" => false,
))
->add("export_type", "choice", array(
"required" => true,
"choices" => $this->exportTypes,
))
;
}
public function setFormatters(array $formattersNames) {
$this->formattersNames = $formattersNames;
return $this;
}
public function setArchiveBuilderNames(array $archiveBuildersNames)
{
$this->archiveBuilderManager += $archiveBuildersNames;
return $this;
}
public function setExportTypes(array $exportType)
{
$this->exportTypes = $exportType;
return $this;
}
public function getName()
{
return "thelia_export";
}
}

View File

@@ -77,6 +77,12 @@ abstract class ImportExportType implements ActiveRecordInterface
*/
protected $import_export_category_id;
/**
* The value for the position field.
* @var int
*/
protected $position;
/**
* The value for the created_at field.
* @var string
@@ -419,6 +425,17 @@ abstract class ImportExportType implements ActiveRecordInterface
return $this->import_export_category_id;
}
/**
* Get the [position] column value.
*
* @return int
*/
public function getPosition()
{
return $this->position;
}
/**
* Get the [optionally formatted] temporal [created_at] column value.
*
@@ -526,6 +543,27 @@ abstract class ImportExportType implements ActiveRecordInterface
return $this;
} // setImportExportCategoryId()
/**
* Set the value of [position] column.
*
* @param int $v new value
* @return \Thelia\Model\ImportExportType The current object (for fluent API support)
*/
public function setPosition($v)
{
if ($v !== null) {
$v = (int) $v;
}
if ($this->position !== $v) {
$this->position = $v;
$this->modifiedColumns[ImportExportTypeTableMap::POSITION] = true;
}
return $this;
} // setPosition()
/**
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
*
@@ -614,13 +652,16 @@ abstract class ImportExportType implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportExportTypeTableMap::translateFieldName('ImportExportCategoryId', TableMap::TYPE_PHPNAME, $indexType)];
$this->import_export_category_id = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ImportExportTypeTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ImportExportTypeTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
$this->position = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ImportExportTypeTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ImportExportTypeTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ImportExportTypeTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
@@ -633,7 +674,7 @@ abstract class ImportExportType implements ActiveRecordInterface
$this->ensureConsistency();
}
return $startcol + 5; // 5 = ImportExportTypeTableMap::NUM_HYDRATE_COLUMNS.
return $startcol + 6; // 6 = ImportExportTypeTableMap::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating \Thelia\Model\ImportExportType object", 0, $e);
@@ -897,6 +938,9 @@ abstract class ImportExportType implements ActiveRecordInterface
if ($this->isColumnModified(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID)) {
$modifiedColumns[':p' . $index++] = '`IMPORT_EXPORT_CATEGORY_ID`';
}
if ($this->isColumnModified(ImportExportTypeTableMap::POSITION)) {
$modifiedColumns[':p' . $index++] = '`POSITION`';
}
if ($this->isColumnModified(ImportExportTypeTableMap::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
}
@@ -923,6 +967,9 @@ abstract class ImportExportType implements ActiveRecordInterface
case '`IMPORT_EXPORT_CATEGORY_ID`':
$stmt->bindValue($identifier, $this->import_export_category_id, PDO::PARAM_INT);
break;
case '`POSITION`':
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
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;
@@ -1001,9 +1048,12 @@ abstract class ImportExportType implements ActiveRecordInterface
return $this->getImportExportCategoryId();
break;
case 3:
return $this->getCreatedAt();
return $this->getPosition();
break;
case 4:
return $this->getCreatedAt();
break;
case 5:
return $this->getUpdatedAt();
break;
default:
@@ -1038,8 +1088,9 @@ abstract class ImportExportType implements ActiveRecordInterface
$keys[0] => $this->getId(),
$keys[1] => $this->getUrlAction(),
$keys[2] => $this->getImportExportCategoryId(),
$keys[3] => $this->getCreatedAt(),
$keys[4] => $this->getUpdatedAt(),
$keys[3] => $this->getPosition(),
$keys[4] => $this->getCreatedAt(),
$keys[5] => $this->getUpdatedAt(),
);
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
@@ -1097,9 +1148,12 @@ abstract class ImportExportType implements ActiveRecordInterface
$this->setImportExportCategoryId($value);
break;
case 3:
$this->setCreatedAt($value);
$this->setPosition($value);
break;
case 4:
$this->setCreatedAt($value);
break;
case 5:
$this->setUpdatedAt($value);
break;
} // switch()
@@ -1129,8 +1183,9 @@ abstract class ImportExportType implements ActiveRecordInterface
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setUrlAction($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setImportExportCategoryId($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]);
if (array_key_exists($keys[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]]);
}
/**
@@ -1145,6 +1200,7 @@ abstract class ImportExportType implements ActiveRecordInterface
if ($this->isColumnModified(ImportExportTypeTableMap::ID)) $criteria->add(ImportExportTypeTableMap::ID, $this->id);
if ($this->isColumnModified(ImportExportTypeTableMap::URL_ACTION)) $criteria->add(ImportExportTypeTableMap::URL_ACTION, $this->url_action);
if ($this->isColumnModified(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID)) $criteria->add(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, $this->import_export_category_id);
if ($this->isColumnModified(ImportExportTypeTableMap::POSITION)) $criteria->add(ImportExportTypeTableMap::POSITION, $this->position);
if ($this->isColumnModified(ImportExportTypeTableMap::CREATED_AT)) $criteria->add(ImportExportTypeTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(ImportExportTypeTableMap::UPDATED_AT)) $criteria->add(ImportExportTypeTableMap::UPDATED_AT, $this->updated_at);
@@ -1212,6 +1268,7 @@ abstract class ImportExportType implements ActiveRecordInterface
{
$copyObj->setUrlAction($this->getUrlAction());
$copyObj->setImportExportCategoryId($this->getImportExportCategoryId());
$copyObj->setPosition($this->getPosition());
$copyObj->setCreatedAt($this->getCreatedAt());
$copyObj->setUpdatedAt($this->getUpdatedAt());
@@ -1556,6 +1613,7 @@ abstract class ImportExportType implements ActiveRecordInterface
$this->id = null;
$this->url_action = null;
$this->import_export_category_id = null;
$this->position = null;
$this->created_at = null;
$this->updated_at = null;
$this->alreadyInSave = false;

View File

@@ -25,12 +25,14 @@ use Thelia\Model\Map\ImportExportTypeTableMap;
* @method ChildImportExportTypeQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildImportExportTypeQuery orderByUrlAction($order = Criteria::ASC) Order by the url_action column
* @method ChildImportExportTypeQuery orderByImportExportCategoryId($order = Criteria::ASC) Order by the import_export_category_id column
* @method ChildImportExportTypeQuery orderByPosition($order = Criteria::ASC) Order by the position column
* @method ChildImportExportTypeQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ChildImportExportTypeQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method ChildImportExportTypeQuery groupById() Group by the id column
* @method ChildImportExportTypeQuery groupByUrlAction() Group by the url_action column
* @method ChildImportExportTypeQuery groupByImportExportCategoryId() Group by the import_export_category_id column
* @method ChildImportExportTypeQuery groupByPosition() Group by the position column
* @method ChildImportExportTypeQuery groupByCreatedAt() Group by the created_at column
* @method ChildImportExportTypeQuery groupByUpdatedAt() Group by the updated_at column
*
@@ -52,12 +54,14 @@ use Thelia\Model\Map\ImportExportTypeTableMap;
* @method ChildImportExportType findOneById(int $id) Return the first ChildImportExportType filtered by the id column
* @method ChildImportExportType findOneByUrlAction(string $url_action) Return the first ChildImportExportType filtered by the url_action column
* @method ChildImportExportType findOneByImportExportCategoryId(int $import_export_category_id) Return the first ChildImportExportType filtered by the import_export_category_id column
* @method ChildImportExportType findOneByPosition(int $position) Return the first ChildImportExportType filtered by the position column
* @method ChildImportExportType findOneByCreatedAt(string $created_at) Return the first ChildImportExportType filtered by the created_at column
* @method ChildImportExportType findOneByUpdatedAt(string $updated_at) Return the first ChildImportExportType filtered by the updated_at column
*
* @method array findById(int $id) Return ChildImportExportType objects filtered by the id column
* @method array findByUrlAction(string $url_action) Return ChildImportExportType objects filtered by the url_action column
* @method array findByImportExportCategoryId(int $import_export_category_id) Return ChildImportExportType objects filtered by the import_export_category_id column
* @method array findByPosition(int $position) Return ChildImportExportType objects filtered by the position column
* @method array findByCreatedAt(string $created_at) Return ChildImportExportType objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ChildImportExportType objects filtered by the updated_at column
*
@@ -148,7 +152,7 @@ abstract class ImportExportTypeQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `URL_ACTION`, `IMPORT_EXPORT_CATEGORY_ID`, `CREATED_AT`, `UPDATED_AT` FROM `import_export_type` WHERE `ID` = :p0';
$sql = 'SELECT `ID`, `URL_ACTION`, `IMPORT_EXPORT_CATEGORY_ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `import_export_type` WHERE `ID` = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -350,6 +354,47 @@ abstract class ImportExportTypeQuery extends ModelCriteria
return $this->addUsingAlias(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, $importExportCategoryId, $comparison);
}
/**
* Filter the query on the position column
*
* Example usage:
* <code>
* $query->filterByPosition(1234); // WHERE position = 1234
* $query->filterByPosition(array(12, 34)); // WHERE position IN (12, 34)
* $query->filterByPosition(array('min' => 12)); // WHERE position > 12
* </code>
*
* @param mixed $position The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildImportExportTypeQuery The current query, for fluid interface
*/
public function filterByPosition($position = null, $comparison = null)
{
if (is_array($position)) {
$useMinMax = false;
if (isset($position['min'])) {
$this->addUsingAlias(ImportExportTypeTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($position['max'])) {
$this->addUsingAlias(ImportExportTypeTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ImportExportTypeTableMap::POSITION, $position, $comparison);
}
/**
* Filter the query on the created_at column
*

View File

@@ -58,7 +58,7 @@ class ImportExportTypeTableMap extends TableMap
/**
* The total number of columns
*/
const NUM_COLUMNS = 5;
const NUM_COLUMNS = 6;
/**
* The number of lazy-loaded columns
@@ -68,7 +68,7 @@ class ImportExportTypeTableMap extends TableMap
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
const NUM_HYDRATE_COLUMNS = 5;
const NUM_HYDRATE_COLUMNS = 6;
/**
* the column name for the ID field
@@ -85,6 +85,11 @@ class ImportExportTypeTableMap extends TableMap
*/
const IMPORT_EXPORT_CATEGORY_ID = 'import_export_type.IMPORT_EXPORT_CATEGORY_ID';
/**
* the column name for the POSITION field
*/
const POSITION = 'import_export_type.POSITION';
/**
* the column name for the CREATED_AT field
*/
@@ -116,12 +121,12 @@ class ImportExportTypeTableMap extends TableMap
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
self::TYPE_PHPNAME => array('Id', 'UrlAction', 'ImportExportCategoryId', 'CreatedAt', 'UpdatedAt', ),
self::TYPE_STUDLYPHPNAME => array('id', 'urlAction', 'importExportCategoryId', 'createdAt', 'updatedAt', ),
self::TYPE_COLNAME => array(ImportExportTypeTableMap::ID, ImportExportTypeTableMap::URL_ACTION, ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, ImportExportTypeTableMap::CREATED_AT, ImportExportTypeTableMap::UPDATED_AT, ),
self::TYPE_RAW_COLNAME => array('ID', 'URL_ACTION', 'IMPORT_EXPORT_CATEGORY_ID', 'CREATED_AT', 'UPDATED_AT', ),
self::TYPE_FIELDNAME => array('id', 'url_action', 'import_export_category_id', 'created_at', 'updated_at', ),
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
self::TYPE_PHPNAME => array('Id', 'UrlAction', 'ImportExportCategoryId', 'Position', 'CreatedAt', 'UpdatedAt', ),
self::TYPE_STUDLYPHPNAME => array('id', 'urlAction', 'importExportCategoryId', 'position', 'createdAt', 'updatedAt', ),
self::TYPE_COLNAME => array(ImportExportTypeTableMap::ID, ImportExportTypeTableMap::URL_ACTION, ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, ImportExportTypeTableMap::POSITION, ImportExportTypeTableMap::CREATED_AT, ImportExportTypeTableMap::UPDATED_AT, ),
self::TYPE_RAW_COLNAME => array('ID', 'URL_ACTION', 'IMPORT_EXPORT_CATEGORY_ID', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
self::TYPE_FIELDNAME => array('id', 'url_action', 'import_export_category_id', 'position', 'created_at', 'updated_at', ),
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
);
/**
@@ -131,12 +136,12 @@ class ImportExportTypeTableMap extends TableMap
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
self::TYPE_PHPNAME => array('Id' => 0, 'UrlAction' => 1, 'ImportExportCategoryId' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ),
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'urlAction' => 1, 'importExportCategoryId' => 2, 'createdAt' => 3, 'updatedAt' => 4, ),
self::TYPE_COLNAME => array(ImportExportTypeTableMap::ID => 0, ImportExportTypeTableMap::URL_ACTION => 1, ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID => 2, ImportExportTypeTableMap::CREATED_AT => 3, ImportExportTypeTableMap::UPDATED_AT => 4, ),
self::TYPE_RAW_COLNAME => array('ID' => 0, 'URL_ACTION' => 1, 'IMPORT_EXPORT_CATEGORY_ID' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ),
self::TYPE_FIELDNAME => array('id' => 0, 'url_action' => 1, 'import_export_category_id' => 2, 'created_at' => 3, 'updated_at' => 4, ),
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
self::TYPE_PHPNAME => array('Id' => 0, 'UrlAction' => 1, 'ImportExportCategoryId' => 2, 'Position' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, ),
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'urlAction' => 1, 'importExportCategoryId' => 2, 'position' => 3, 'createdAt' => 4, 'updatedAt' => 5, ),
self::TYPE_COLNAME => array(ImportExportTypeTableMap::ID => 0, ImportExportTypeTableMap::URL_ACTION => 1, ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID => 2, ImportExportTypeTableMap::POSITION => 3, ImportExportTypeTableMap::CREATED_AT => 4, ImportExportTypeTableMap::UPDATED_AT => 5, ),
self::TYPE_RAW_COLNAME => array('ID' => 0, 'URL_ACTION' => 1, 'IMPORT_EXPORT_CATEGORY_ID' => 2, 'POSITION' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, ),
self::TYPE_FIELDNAME => array('id' => 0, 'url_action' => 1, 'import_export_category_id' => 2, 'position' => 3, 'created_at' => 4, 'updated_at' => 5, ),
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
);
/**
@@ -158,6 +163,7 @@ class ImportExportTypeTableMap extends TableMap
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('URL_ACTION', 'UrlAction', 'VARCHAR', true, 255, null);
$this->addForeignKey('IMPORT_EXPORT_CATEGORY_ID', 'ImportExportCategoryId', 'INTEGER', 'import_export_category', 'ID', true, null, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
} // initialize()
@@ -335,12 +341,14 @@ class ImportExportTypeTableMap extends TableMap
$criteria->addSelectColumn(ImportExportTypeTableMap::ID);
$criteria->addSelectColumn(ImportExportTypeTableMap::URL_ACTION);
$criteria->addSelectColumn(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID);
$criteria->addSelectColumn(ImportExportTypeTableMap::POSITION);
$criteria->addSelectColumn(ImportExportTypeTableMap::CREATED_AT);
$criteria->addSelectColumn(ImportExportTypeTableMap::UPDATED_AT);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.URL_ACTION');
$criteria->addSelectColumn($alias . '.IMPORT_EXPORT_CATEGORY_ID');
$criteria->addSelectColumn($alias . '.POSITION');
$criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT');
}