Initial commit

This commit is contained in:
2021-01-19 18:19:37 +01:00
commit 6524a071df
14506 changed files with 1808535 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace Thelia\Model;
use Thelia\Model\Base\FeatureTemplate as BaseFeatureTemplate;
use Propel\Runtime\Connection\ConnectionInterface;
class FeatureTemplate extends BaseFeatureTemplate
{
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
use \Thelia\Model\Tools\PositionManagementTrait;
/**
* Calculate next position relative to our template
*/
protected function addCriteriaToPositionQuery($query)
{
$query->filterByTemplateId($this->getTemplateId());
}
/**
* {@inheritDoc}
*/
public function preInsert(ConnectionInterface $con = null)
{
parent::preInsert($con);
// Set the current position for the new object
$this->setPosition($this->getNextPosition());
return true;
}
}