protected function get_fieldlist() : array {
        global $DB;

        if (null === $this->fields) {
            $fields = [];
            foreach (array_keys($DB->get_columns($this->tablename)) as $fieldname) {
                $fields["{$this->fieldprefix}{$fieldname}"] = $fieldname;
            }

            $this->fields = $fields;
        }

        return $this->fields;
    }
protected function get_fieldlist() : array {
        global $DB;

        if (null === $this->fields) {
            $fields = [];
            foreach (array_keys($DB->get_columns($this->tablename)) as $fieldname) {
                $fields["{$this->fieldprefix}{$fieldname}"] = $fieldname;
            }

            $this->fields = $fields;
        }

        return $this->fields;
    }
protected function get_fieldlist ( ) : array { global $ DB ; if ( null === $ this -> fields ) { $ fields = [ ] ; foreach ( array_keys ( $ DB -> get_columns ( $ this -> tablename ) ) as $ fieldname ) { $ fields [ "{$this->fieldprefix}{$fieldname}" ] = $ fieldname ; } $ this -> fields = $ fields ; } return $ this -> fields ; }
Get the list of fields in a table for use in preloading fields.

@return  array       The list of columns in a table. The array key is the column name with an applied prefix.
Get the list of fields in a table for use in preloading fields .