<?php
namespace Blackbit\SingleSignOnBundle;
use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
class BlackbitSingleSignOnBundle extends AbstractPimcoreBundle
{
use PackageVersionTrait {
getVersion as protected getComposerVersion;
}
public const PERMISSION_KEY = 'sso_permission_config';
/**
* @return string[]
*/
public function getJsPaths(): array
{
return [
'/bundles/blackbitsinglesignon/js/pimcore/startup.js',
'/bundles/blackbitsinglesignon/js/pimcore/configPanel.js'
];
}
public function getInstaller()
{
return $this->container->get(Installer::class);
}
public function getCssPaths()
{
return [
'/bundles/blackbitsinglesignon/css/login_form.css',
'/bundles/blackbitsinglesignon/css/admin.css',
];
}
/**
* Returns the composer package name used to resolve the version
*
* @return string
*/
protected function getComposerPackageName(): string
{
return 'blackbit/single-sign-on';
}
public function getVersion()
{
try {
return $this->getComposerVersion();
} catch (\Exception $e) {
return 'unknown';
}
}
}