- Added to doctrine config in
/di/doctrine.php
use Gedmo\Tree\TreeListener;
$evm = new EventManager();
$treeListener = new TreeListener();
$evm->addEventSubscriber($treeListener);
-
Define in DI
\Psr\EventDispatcher\EventDispatcherInterface
-
Diff migration, migrate and clear cache-metadata
composer diff
composer migrate
- Migration function
./vendor/bin/doctrine-migrations migrations:generate
//for Mysql insert to migration
$this->addSql(<<<SQL
CREATE FUNCTION CONVERT_PRICE(
`price` INT,
`main_currency` VARCHAR(3),
`convert_currency` VARCHAR(3)
) RETURNS double
DETERMINISTIC
BEGIN
IF (main_currency = convert_currency)
THEN
SET @result = price;
ELSE
SET @rate = (SELECT rate FROM catalog_currency_rate WHERE
main = main_currency
AND `convert` = convert_currency
);
SET @result = price * @rate;
END IF;
RETURN @result;
END;
SQL);
composer migrate
- Setting elfinder
disableEditProductCode
boolallowedPerPage
intproductImageStorage
stringstorageUploads
arrayproductFileStorage
stringthumbnailService
arrayadminTemplateDir
stringeditor
arrayproductDescription
categoryDescription
categoryShortDescription
allowedPerPage
int[]sort
stringminSearchChars
intshowSubcategoryProducts
booldelimiterOptions
stringallocatedMemoryDynamically
boolcurrency
arraydefault
stringratio
array
admin
arraysearchFields
array