src/Extension/FluentExtension.php
public function getLocalisedFields($class = null)
    {
        if (!$class) {
            $class = get_class($this->owner);
        }
        if (isset($this->localisedFields[$class])) {
            return $this->localisedFields[$class];
        }

        // List of DB fields
        $fields = DataObject::getSchema()->databaseFields($class, false);
        $filter = Config::inst()->get($class, 'translate', Config::UNINHERITED);
        if ($filter === self::TRANSLATE_NONE || empty($fields)) {
            return $this->localisedFields[$class] = [];
        }

        // filter out DB
        foreach ($fields as $field => $type) {
            if (!$this->isFieldLocalised($field, $type, $class)) {
                unset($fields[$field]);
            }
        }

        return $this->localisedFields[$class] = $fields;
    }
public function getLocalisedFields($class = null)
    {
        if (!$class) {
            $class = get_class($this->owner);
        }
        if (isset($this->localisedFields[$class])) {
            return $this->localisedFields[$class];
        }

        // List of DB fields
        $fields = DataObject::getSchema()->databaseFields($class, false);
        $filter = Config::inst()->get($class, 'translate', Config::UNINHERITED);
        if ($filter === self::TRANSLATE_NONE || empty($fields)) {
            return $this->localisedFields[$class] = [];
        }

        // filter out DB
        foreach ($fields as $field => $type) {
            if (!$this->isFieldLocalised($field, $type, $class)) {
                unset($fields[$field]);
            }
        }

        return $this->localisedFields[$class] = $fields;
    }
public function getLocalisedFields ( $ class = null ) { if ( ! $ class ) { $ class = get_class ( $ this -> owner ) ; } if ( isset ( $ this -> localisedFields [ $ class ] ) ) { return $ this -> localisedFields [ $ class ] ; } // List of DB fields $ fields = DataObject :: getSchema ( ) -> databaseFields ( $ class , false ) ; $ filter = Config :: inst ( ) -> get ( $ class , 'translate' , Config :: UNINHERITED ) ; if ( $ filter === self :: TRANSLATE_NONE || empty ( $ fields ) ) { return $ this -> localisedFields [ $ class ] = [ ] ; } // filter out DB foreach ( $ fields as $ field => $ type ) { if ( ! $ this -> isFieldLocalised ( $ field , $ type , $ class ) ) { unset ( $ fields [ $ field ] ) ; } } return $ this -> localisedFields [ $ class ] = $ fields ; }
Get list of fields that are localised

@param string $class Class to get fields for (if parent)
@return array
Get list of fields that are localised