src/Utility/Validate/Utility.php
public static function getVirtualModuleFields(string $module, bool $validate = true) : array
    {
        $fields = [];

        $mc = new ModuleConfig(ConfigType::MODULE(), $module, null, ['cacheSkip' => true]);
        $mc->setParser(new Parser($mc->createSchema(), ['validate' => $validate]));
        $virtualFields = Convert::objectToArray($mc->parse());

        if (isset($virtualFields['virtualFields'])) {
            $fields = $virtualFields['virtualFields'];
        }

        return $fields;
    }
public static function getVirtualModuleFields(string $module, bool $validate = true) : array
    {
        $fields = [];

        $mc = new ModuleConfig(ConfigType::MODULE(), $module, null, ['cacheSkip' => true]);
        $mc->setParser(new Parser($mc->createSchema(), ['validate' => $validate]));
        $virtualFields = Convert::objectToArray($mc->parse());

        if (isset($virtualFields['virtualFields'])) {
            $fields = $virtualFields['virtualFields'];
        }

        return $fields;
    }
public static function getVirtualModuleFields ( string $ module , bool $ validate = true ) : array { $ fields = [ ] ; $ mc = new ModuleConfig ( ConfigType :: MODULE ( ) , $ module , null , [ 'cacheSkip' => true ] ) ; $ mc -> setParser ( new Parser ( $ mc -> createSchema ( ) , [ 'validate' => $ validate ] ) ) ; $ virtualFields = Convert :: objectToArray ( $ mc -> parse ( ) ) ; if ( isset ( $ virtualFields [ 'virtualFields' ] ) ) { $ fields = $ virtualFields [ 'virtualFields' ] ; } return $ fields ; }
Returns a list of virtual fields in `config.json`.

@param string $module Module name.
@param bool $validate Should the data be validated against the schema.
@return string[] list of virtual fields.
Returns a list of virtual fields in config . json .