ApiPlatformTranslationExtension::getAlias()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Locastic\ApiPlatformTranslationBundle\DependencyInjection;
6
7
use Symfony\Component\Config\FileLocator;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\DependencyInjection\Loader;
10
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
11
12
/**
13
 * This is the class that loads and manages your bundle configuration
14
 *
15
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
16
 */
17
class ApiPlatformTranslationExtension extends Extension
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function load(array $configs, ContainerBuilder $container): void
23
    {
24
        $directory =
25
            __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Resources' . DIRECTORY_SEPARATOR . 'config';
26
27
        $loader = new Loader\YamlFileLoader($container, new FileLocator($directory));
28
        $loader->load('services.yml');
29
    }
30
31
    public function getAlias(): string
32
    {
33
        return 'api_platform_translation';
34
    }
35
}
36