Installer   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 23
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A install() 0 6 1
A configureModuleRights() 0 4 1
A createEntityTables() 0 8 1
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