* added support for hourly rate column in detail table * allow to register icon in extension * allow to show QR code secret * new translations * bump theme and packages * fix validation for invoice-document-filenames with uppercase character * max upload size 1MB * fix last month in daterange-picker in certain situations, more years in quick-select * remove unused package-versions-deprecated * link preferences from contract warning message * added page_setup page layout * prevent DROP TABLE in addSQL() and replace drop table with schema call * added azuyalabs/yasumi
43 lines
1.3 KiB
PHP
43 lines
1.3 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the Kimai time-tracking app.
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace App\Plugin;
|
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
|
|
|
abstract class AbstractPluginExtension extends Extension
|
|
{
|
|
protected function registerIcon(ContainerBuilder $container, string $name, string $icon): void
|
|
{
|
|
$container->setParameter(
|
|
'tabler_bundle.icons',
|
|
array_merge(
|
|
$container->getParameter('tabler_bundle.icons'),
|
|
[$name => $icon]
|
|
)
|
|
);
|
|
}
|
|
|
|
protected function registerBundleConfiguration(ContainerBuilder $container, array $configs): void
|
|
{
|
|
$bundleConfig = [$this->getAlias() => $configs];
|
|
|
|
if ($container->hasParameter('kimai.bundles.config')) {
|
|
$config = $container->getParameter('kimai.bundles.config');
|
|
if (!\is_array($config)) {
|
|
throw new \Exception('Invalid bundle configuration registered for ' . $this->getAlias());
|
|
}
|
|
$bundleConfig = array_merge($config, $bundleConfig);
|
|
}
|
|
|
|
$container->setParameter('kimai.bundles.config', $bundleConfig);
|
|
}
|
|
}
|