Installer::configureModuleRights()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Backend\Modules\MediaLibraryImporter\Installer;
4
5
use Backend\Modules\MediaLibraryImporter\Domain\MediaItemImport\MediaItemImport;
6
use Backend\Core\Engine\Model;
7
use Backend\Core\Installer\ModuleInstaller;
8
9
/**
10
 * Installer for the MediaLibrary module
11
 */
12
class Installer extends ModuleInstaller
13
{
14
    public function install(): void
15
    {
16
        $this->addModule('MediaLibraryImporter');
17
        $this->createEntityTables();
18
        $this->configureModuleRights();
19
    }
20
21
    protected function configureModuleRights(): void
22
    {
23
        $this->setModuleRights(1, $this->getModule());
24
    }
25
26
    private function createEntityTables(): void
27
    {
28
        Model::get('fork.entity.create_schema')->forEntityClasses(
29
            [
30
                MediaItemImport::class,
31
            ]
32
        );
33
    }
34
}
35