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

        $config = new ModuleConfig(ConfigType::MODULE(), $moduleName);
        $parsed = $config->parse();

        if (! property_exists($parsed, 'table')) {
            return [];
        }

        if (! property_exists($parsed->table, 'lookup_fields')) {
            return [];
        }

        return $parsed->table->lookup_fields;
    }
public static function getLookup(RepositoryInterface $table) : array
    {
        $moduleName = App::shortName(get_class($table), 'Model/Table', 'Table');

        $config = new ModuleConfig(ConfigType::MODULE(), $moduleName);
        $parsed = $config->parse();

        if (! property_exists($parsed, 'table')) {
            return [];
        }

        if (! property_exists($parsed->table, 'lookup_fields')) {
            return [];
        }

        return $parsed->table->lookup_fields;
    }
public static function getLookup ( RepositoryInterface $ table ) : array { $ moduleName = App :: shortName ( get_class ( $ table ) , 'Model/Table' , 'Table' ) ; $ config = new ModuleConfig ( ConfigType :: MODULE ( ) , $ moduleName ) ; $ parsed = $ config -> parse ( ) ; if ( ! property_exists ( $ parsed , 'table' ) ) { return [ ] ; } if ( ! property_exists ( $ parsed -> table , 'lookup_fields' ) ) { return [ ] ; } return $ parsed -> table -> lookup_fields ; }
Get Table's lookup fields.

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