Backend\Modules\ContentBlocks\Installer\Installer::install PHP 메소드

install() 공개 메소드

Install the module
public install ( )
    public function install()
    {
        // add the schema of the entity to the database
        Model::get('fork.entity.create_schema')->forEntityClass(ContentBlock::class);
        // add 'content_blocks' as a module
        $this->addModule('ContentBlocks');
        // import locale
        $this->importLocale(__DIR__ . '/Data/locale.xml');
        // general settings
        $this->setSetting($this->getModule(), 'max_num_revisions', 20);
        // module rights
        $this->setModuleRights(1, $this->getModule());
        // action rights
        $this->setActionRights(1, $this->getModule(), 'Add');
        $this->setActionRights(1, $this->getModule(), 'Delete');
        $this->setActionRights(1, $this->getModule(), 'Edit');
        $this->setActionRights(1, $this->getModule(), 'Index');
        // set navigation
        $navigationModulesId = $this->setNavigation(null, 'Modules');
        $this->setNavigation($navigationModulesId, $this->getModule(), 'content_blocks/index', ['content_blocks/add', 'content_blocks/edit']);
    }
Installer