From 6bf37beb42f4b3f80cae61e28d4fcdc14d4f7e08 Mon Sep 17 00:00:00 2001 From: Vladimir Malik Date: Thu, 1 Oct 2020 10:02:06 +0300 Subject: [PATCH] use Composer package information for Bundle Information in "Bundles" grid --- src/Xliff2Bundle/Xliff2Bundle.php | 32 +++++++++++-------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/src/Xliff2Bundle/Xliff2Bundle.php b/src/Xliff2Bundle/Xliff2Bundle.php index 15d4fbd..82ffc3b 100644 --- a/src/Xliff2Bundle/Xliff2Bundle.php +++ b/src/Xliff2Bundle/Xliff2Bundle.php @@ -13,14 +13,20 @@ use Xliff2Bundle\DependencyInjection\Compiler\Xliff20CompilerPass; use Pimcore\Extension\Bundle\AbstractPimcoreBundle; use Pimcore\Extension\Bundle\PimcoreBundleInterface; +use Pimcore\Extension\Bundle\Traits\PackageVersionTrait; use Symfony\Component\DependencyInjection\ContainerBuilder; -/** - * Class AmazonMarketplaceBundle - * @package AmazonMarketplaceBundle - */ class Xliff2Bundle extends AbstractPimcoreBundle implements PimcoreBundleInterface { + use PackageVersionTrait; + + const PACKAGE_NAME = 'asioso/pimcore-xliff2_0-module'; + + protected function getComposerPackageName() + { + return self::PACKAGE_NAME; + } + public function build(ContainerBuilder $container) { parent::build($container); @@ -32,24 +38,8 @@ public function getNiceName() return 'Asioso - Xliff 2.0 Bundle'; } - /** - * Bundle description as shown in extension manager - * - * @return string - */ - public function getDescription() - { - return ""; - } - - public function getVersion() - { - return 'v1.0'; - } - public static function getSolutionVersion() { - return "v1.0"; + return $this->getVersion(); } - }