src/Utility/Field.php
public static function getCsv(RepositoryInterface $table) : array
    {
        $moduleName = App::shortName(get_class($table), 'Model/Table', 'Table');

        $config = new ModuleConfig(ConfigType::MIGRATION(), $moduleName);
        $parsed = json_encode($config->parse());
        if (false === $parsed) {
            return [];
        }

        $parsed = json_decode($parsed, true);

        if (empty($parsed)) {
            return [];
        }

        $result = [];
        foreach ($parsed as $field => $params) {
            $result[$field] = new CsvField($params);
        }

        return $result;
    }
public static function getCsv(RepositoryInterface $table) : array
    {
        $moduleName = App::shortName(get_class($table), 'Model/Table', 'Table');

        $config = new ModuleConfig(ConfigType::MIGRATION(), $moduleName);
        $parsed = json_encode($config->parse());
        if (false === $parsed) {
            return [];
        }

        $parsed = json_decode($parsed, true);

        if (empty($parsed)) {
            return [];
        }

        $result = [];
        foreach ($parsed as $field => $params) {
            $result[$field] = new CsvField($params);
        }

        return $result;
    }
public static function getCsv ( RepositoryInterface $ table ) : array { $ moduleName = App :: shortName ( get_class ( $ table ) , 'Model/Table' , 'Table' ) ; $ config = new ModuleConfig ( ConfigType :: MIGRATION ( ) , $ moduleName ) ; $ parsed = json_encode ( $ config -> parse ( ) ) ; if ( false === $ parsed ) { return [ ] ; } $ parsed = json_decode ( $ parsed , true ) ; if ( empty ( $ parsed ) ) { return [ ] ; } $ result = [ ] ; foreach ( $ parsed as $ field => $ params ) { $ result [ $ field ] = new CsvField ( $ params ) ; } return $ result ; }
Get Table's csv fields.

@param \Cake\Datasource\RepositoryInterface $table Table instance
@return mixed[]
Get Table s csv fields .