1. Go to this page and download the library: Download brosua/enums library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
brosua / enums example snippets
use Brosua\Enums\Base;
enum MyEnum: int
{
use Base;
case One = 1;
case Two = 1;
protected static function getLanguageFilePath(): string
{
return 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:myEnum.';
}
}
use Brosua\Enums\Translation;
enum MyEnum: int
{
use Translation;
case One = 1;
case Two = 1;
protected static function getLanguageFilePath(): string
{
return 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:myEnum.';
}
}
use Brosua\Enums\TcaOptions;
enum MyEnum: int
{
use TcaOptions;
case One = 1;
case Two = 1;
protected static function getLanguageFilePath(): string
{
return 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:myEnum.';
}
}