vendor/blackbit/single-sign-on/BlackbitSingleSignOnBundle.php line 8

Open in your IDE?
  1. <?php
  2. namespace Blackbit\SingleSignOnBundle;
  3. use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
  4. use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
  5. class BlackbitSingleSignOnBundle extends AbstractPimcoreBundle
  6. {
  7.     use PackageVersionTrait {
  8.         getVersion as protected getComposerVersion;
  9.     }
  10.     public const PERMISSION_KEY 'sso_permission_config';
  11.     /**
  12.      * @return string[]
  13.      */
  14.     public function getJsPaths(): array
  15.     {
  16.         return [
  17.             '/bundles/blackbitsinglesignon/js/pimcore/startup.js',
  18.             '/bundles/blackbitsinglesignon/js/pimcore/configPanel.js'
  19.         ];
  20.     }
  21.     public function getInstaller()
  22.     {
  23.         return $this->container->get(Installer::class);
  24.     }
  25.     public function getCssPaths()
  26.     {
  27.         return [
  28.             '/bundles/blackbitsinglesignon/css/login_form.css',
  29.             '/bundles/blackbitsinglesignon/css/admin.css',
  30.         ];
  31.     }
  32.     /**
  33.      * Returns the composer package name used to resolve the version
  34.      *
  35.      * @return string
  36.      */
  37.     protected function getComposerPackageName(): string
  38.     {
  39.         return 'blackbit/single-sign-on';
  40.     }
  41.     public function getVersion()
  42.     {
  43.         try {
  44.             return $this->getComposerVersion();
  45.         } catch (\Exception $e) {
  46.             return 'unknown';
  47.         }
  48.     }
  49. }