Commit d7b9e219 authored by Tino Goratsch's avatar Tino Goratsch

Squashed 'ACP3/Modules/ACP3/Acp/' content from commit a9d9cbb

git-subtree-dir: ACP3/Modules/ACP3/Acp
git-subtree-split: a9d9cbb312e2a0a81ee9833984f5ad081c06ea3f
parents
.idea
vendor/
<?php
namespace ACP3\Modules\ACP3\Acp\Controller\Admin;
use ACP3\Core;
/**
* Class Index
* @package ACP3\Modules\ACP3\Acp\Controller\Admin
*/
class Index extends Core\Modules\Controller\Admin
{
public function actionIndex()
{
$activeModules = $this->modules->getActiveModules();
$allowedModules = [];
foreach ($activeModules as $name => $info) {
$dir = strtolower($info['dir']);
if ($this->acl->hasPermission('admin/' . $dir) === true && $dir !== 'acp') {
$allowedModules[$name]['name'] = $name;
$allowedModules[$name]['dir'] = $dir;
}
}
$this->view->assign('modules', $allowedModules);
}
}
<?php
namespace ACP3\Modules\ACP3\Acp;
use ACP3\Core\Modules;
/**
* Class Installer
* @package ACP3\Modules\ACP3\Acp
*/
class Installer extends Modules\AbstractInstaller
{
const MODULE_NAME = 'acp';
const SCHEMA_VERSION = 30;
/**
* @inheritdoc
*/
public function removeResources()
{
return true;
}
/**
* @inheritdoc
*/
public function createTables()
{
return [];
}
/**
* @inheritdoc
*/
public function removeTables()
{
return [];
}
/**
* @inheritdoc
*/
public function settings()
{
return [];
}
/**
* @inheritdoc
*/
public function removeSettings()
{
return true;
}
/**
* @inheritdoc
*/
public function removeFromModulesTable()
{
return true;
}
/**
* @inheritdoc
*/
public function schemaUpdates()
{
return [];
}
}
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<language>
<info>
<name>Deutsch (Deutschland)</name>
<direction>ltr</direction>
</info>
<keys>
<item key="access_to_modules">Sie haben Zugriff auf folgende Module:</item>
<item key="acp">Administration</item>
<item key="mod_description">Die Startseite der Administrationsoberfläche.</item>
</keys>
</language>
<?xml version="1.0" encoding="UTF-8"?>
<language>
<info>
<name>English (United States)</name>
<direction>ltr</direction>
</info>
<keys>
<item key="access_to_modules">You have access to the following modules:</item>
<item key="acp">Administration</item>
<item key="mod_description">Homepage of the administration area.</item>
</keys>
</language>
{extends file="asset:layout.tpl"}
{block CONTENT}
<div class="well well-small">
<h4>{lang t="acp|access_to_modules"}</h4>
<ul>
{foreach $modules as $module}
<li><a href="{uri args="acp/`$module.dir`"}">{$module.name}</a></li>
{/foreach}
</ul>
</div>
{/block}
\ No newline at end of file
{
"name": "acp3/module-acp",
"type": "acp3-module",
"require": {
"acp3/composer-installer": "*"
},
"extra": {
"installer-name": "ACP3/Acp"
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module>
<info>
<name lang="true"/>
<description lang="true"/>
<author>Tino Goratsch</author>
<version core="true"/>
<protected/>
</info>
</module>
parameters:
acp.controller.admin.index.fqdn: 'ACP3\Modules\ACP3\Acp\Controller\Admin\Index'
acp.installer.fqdn: 'ACP3\Modules\ACP3\Acp\Installer'
services:
acp.controller.admin.index:
class: %acp.controller.admin.index.fqdn%
parent: core.modules.controller.admin
acp.installer:
class: %acp.installer.fqdn%
parent: core.modules.abstractInstaller
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment