src/Utility/Field.php
public static function getList(string $listName, bool $flat = false) : array
    {
        $moduleName = '';
        if (false !== strpos($listName, '.')) {
            list($moduleName, $listName) = explode('.', $listName, 2);
        }

        $config = new ModuleConfig(ConfigType::LISTS(), $moduleName, $listName, ['flatten' => $flat]);
        try {
            $config = json_encode($config->parse());
            $config = false !== $config ? json_decode($config, true) : [];
            $items = isset($config['items']) ? $config['items'] : [];
        } catch (InvalidArgumentException $e) {
            return [];
        }

        return $items;
    }
public static function getList(string $listName, bool $flat = false) : array
    {
        $moduleName = '';
        if (false !== strpos($listName, '.')) {
            list($moduleName, $listName) = explode('.', $listName, 2);
        }

        $config = new ModuleConfig(ConfigType::LISTS(), $moduleName, $listName, ['flatten' => $flat]);
        try {
            $config = json_encode($config->parse());
            $config = false !== $config ? json_decode($config, true) : [];
            $items = isset($config['items']) ? $config['items'] : [];
        } catch (InvalidArgumentException $e) {
            return [];
        }

        return $items;
    }
public static function getList ( string $ listName , bool $ flat = false ) : array { $ moduleName = '' ; if ( false !== strpos ( $ listName , '.' ) ) { list ( $ moduleName , $ listName ) = explode ( '.' , $ listName , 2 ) ; } $ config = new ModuleConfig ( ConfigType :: LISTS ( ) , $ moduleName , $ listName , [ 'flatten' => $ flat ] ) ; try { $ config = json_encode ( $ config -> parse ( ) ) ; $ config = false !== $ config ? json_decode ( $ config , true ) : [ ] ; $ items = isset ( $ config [ 'items' ] ) ? $ config [ 'items' ] : [ ] ; } catch ( InvalidArgumentException $ e ) { return [ ] ; } return $ items ; }
Get list's options.

@param string $listName List name
@param bool $flat Fatten list flag
@return mixed[]
Get list s options .