<?php
/**
* CookieConsentBundle
* Copyright (c) Die Leoparden GmbH
*/
namespace DieLeoparden\CookieConsentBundle;
use DieLeoparden\CookieConsentBundle\Tool\Install;
use Exception;
use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
/**
* Class CookieConsentBundle
*/
class CookieConsentBundle extends AbstractPimcoreBundle
{
use PackageVersionTrait {
getVersion as traitGetVersion;
}
const PACKAGE_NAME = 'die-leoparden/cookie-consent';
/**
* @return string
*/
public function getVersion(): string
{
try {
return $this->traitGetVersion();
} catch (Exception $e) {
return 'local';
}
}
/**
* @return mixed
*/
public function getInstaller()
{
return $this->container->get(Install::class);
}
/**
* @return string
*/
protected function getComposerPackageName(): string
{
return self::PACKAGE_NAME;
}
}