Files
core/app/Enumerations/ModulesHandlerToId.php
T
Michal Kváček a67417380f FEATURE: add enumeration for translating module handlers for their ids
This feature will need bit more optimalization. This is somehow weird approach.
2016-03-09 22:11:49 +01:00

21 lines
435 B
PHP

<?php
namespace App\Enumerations;
use App\Models\Module;
class ModulesHandlerToId extends BaseEnumeration
{
/**
* Init list of all installed modules
*
* @throws Exceptions\EnumerationExistsException
*/
protected static function init()
{
$modules = Module::all(['handler', 'id']);
foreach ($modules as $module) {
self::push($module->handler, $module->id);
}
}
}