Habari\Post::get_schema_map PHP Метод

get_schema_map() публичный Метод

Get the schema data for this post
public get_schema_map ( ) : array
Результат array An array of schema data for this post
    public function get_schema_map()
    {
        if (empty($this->schema)) {
            $default_fields = Post::default_fields();
            $schema = array('posts' => array_combine(array_keys($default_fields), array_keys($default_fields)));
            $schema['*'] = array();
            $fields = array_merge($this->fields, $this->newfields);
            foreach ($fields as $field => $value) {
                if (!isset($default_fields[$field])) {
                    $schema['*'][$field] = $field;
                }
            }
            $schema = Plugins::filter('post_schema_map_' . Utils::slugify(Post::type_name($fields['content_type']), '_'), $schema, $this);
            $schema = Plugins::filter('post_schema_map', $schema, $this);
            $this->schema = $schema;
        }
        return $this->schema;
    }