src/Extension/FluentExtension.php
protected function isFieldLocalised($field, $type, $class)
    {
        // Explicit per-table filter
        $filter = Config::inst()->get($class, 'translate', Config::UNINHERITED);
        if ($filter === self::TRANSLATE_NONE) {
            return false;
        }
        if ($filter && is_array($filter)) {
            return in_array($field, $filter);
        }

        // Named blacklist
        $fieldsExclude = Config::inst()->get($class, 'field_exclude');
        if ($fieldsExclude && $this->anyMatch($field, $fieldsExclude)) {
            return false;
        }

        // Named whitelist
        $fieldsInclude = Config::inst()->get($class, 'field_include');
        if ($fieldsInclude && $this->anyMatch($field, $fieldsInclude)) {
            return true;
        }

        // Typed blacklist
        $dataExclude = Config::inst()->get($class, 'data_exclude');
        if ($dataExclude && $this->anyMatch($type, $dataExclude)) {
            return false;
        }

        // Typed whitelist
        $dataInclude = Config::inst()->get($class, 'data_include');
        if ($dataInclude && $this->anyMatch($type, $dataInclude)) {
            return true;
        }

        return false;
    }
protected function isFieldLocalised($field, $type, $class)
    {
        // Explicit per-table filter
        $filter = Config::inst()->get($class, 'translate', Config::UNINHERITED);
        if ($filter === self::TRANSLATE_NONE) {
            return false;
        }
        if ($filter && is_array($filter)) {
            return in_array($field, $filter);
        }

        // Named blacklist
        $fieldsExclude = Config::inst()->get($class, 'field_exclude');
        if ($fieldsExclude && $this->anyMatch($field, $fieldsExclude)) {
            return false;
        }

        // Named whitelist
        $fieldsInclude = Config::inst()->get($class, 'field_include');
        if ($fieldsInclude && $this->anyMatch($field, $fieldsInclude)) {
            return true;
        }

        // Typed blacklist
        $dataExclude = Config::inst()->get($class, 'data_exclude');
        if ($dataExclude && $this->anyMatch($type, $dataExclude)) {
            return false;
        }

        // Typed whitelist
        $dataInclude = Config::inst()->get($class, 'data_include');
        if ($dataInclude && $this->anyMatch($type, $dataInclude)) {
            return true;
        }

        return false;
    }
protected function isFieldLocalised ( $ field , $ type , $ class ) { // Explicit per-table filter $ filter = Config :: inst ( ) -> get ( $ class , 'translate' , Config :: UNINHERITED ) ; if ( $ filter === self :: TRANSLATE_NONE ) { return false ; } if ( $ filter && is_array ( $ filter ) ) { return in_array ( $ field , $ filter ) ; } // Named blacklist $ fieldsExclude = Config :: inst ( ) -> get ( $ class , 'field_exclude' ) ; if ( $ fieldsExclude && $ this -> anyMatch ( $ field , $ fieldsExclude ) ) { return false ; } // Named whitelist $ fieldsInclude = Config :: inst ( ) -> get ( $ class , 'field_include' ) ; if ( $ fieldsInclude && $ this -> anyMatch ( $ field , $ fieldsInclude ) ) { return true ; } // Typed blacklist $ dataExclude = Config :: inst ( ) -> get ( $ class , 'data_exclude' ) ; if ( $ dataExclude && $ this -> anyMatch ( $ type , $ dataExclude ) ) { return false ; } // Typed whitelist $ dataInclude = Config :: inst ( ) -> get ( $ class , 'data_include' ) ; if ( $ dataInclude && $ this -> anyMatch ( $ type , $ dataInclude ) ) { return true ; } return false ; }
Check if a field is marked for localisation

@param string $field Field name
@param string $type Field type
@param string $class Class this field is defined in
@return bool
Check if a field is marked for localisation