vendor/die-leoparden/cookie-consent/CookieConsentBundle.php line 17

Open in your IDE?
  1. <?php
  2. /**
  3.  * CookieConsentBundle
  4.  * Copyright (c) Die Leoparden GmbH
  5.  */
  6. namespace DieLeoparden\CookieConsentBundle;
  7. use DieLeoparden\CookieConsentBundle\Tool\Install;
  8. use Exception;
  9. use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
  10. use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
  11. /**
  12.  * Class CookieConsentBundle
  13.  */
  14. class CookieConsentBundle extends AbstractPimcoreBundle
  15. {
  16.     use PackageVersionTrait {
  17.         getVersion as traitGetVersion;
  18.     }
  19.     const PACKAGE_NAME 'die-leoparden/cookie-consent';
  20.     /**
  21.      * @return string
  22.      */
  23.     public function getVersion(): string
  24.     {
  25.         try {
  26.             return $this->traitGetVersion();
  27.         } catch (Exception $e) {
  28.             return 'local';
  29.         }
  30.     }
  31.     /**
  32.      * @return mixed
  33.      */
  34.     public function getInstaller()
  35.     {
  36.         return $this->container->get(Install::class);
  37.     }
  38.     /**
  39.      * @return string
  40.      */
  41.     protected function getComposerPackageName(): string
  42.     {
  43.         return self::PACKAGE_NAME;
  44.     }
  45. }