mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Renamed domain LayerManagement to Layer
This commit is contained in:
46
application/symfony/src/Domain/Layer/LayerActionMap.php
Normal file
46
application/symfony/src/Domain/Layer/LayerActionMap.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Layer;
|
||||
|
||||
use Infinito\DBAL\Types\Meta\Right\LayerType;
|
||||
use Infinito\DBAL\Types\ActionType;
|
||||
use Infinito\Domain\MapManagement\AbstractMap;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
final class LayerActionMap extends AbstractMap implements LayerActionMapInterface
|
||||
{
|
||||
/**
|
||||
* @var array Add new combination possibilities to this map!
|
||||
*/
|
||||
const LAYER_ACTION_MAP = [
|
||||
LayerType::SOURCE => [
|
||||
ActionType::READ,
|
||||
ActionType::CREATE,
|
||||
ActionType::UPDATE,
|
||||
ActionType::DELETE,
|
||||
ActionType::EXECUTE,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Layer\LayerActionMapInterface::getLayers()
|
||||
*/
|
||||
public static function getLayers(string $action): array
|
||||
{
|
||||
return parent::getIndizesByValue($action, self::LAYER_ACTION_MAP);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Layer\LayerActionMapInterface::getActions()
|
||||
*/
|
||||
public static function getActions(string $layer): array
|
||||
{
|
||||
return parent::getValuesByIndex($layer, self::LAYER_ACTION_MAP);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user