public function get_nested_name($includelinks = true, $separator = ' / ', $options = []) {
        // Get the name of hierarchical name of this category.
        $parents = $this->get_parents();
        $categories = static::get_many($parents);
        $categories[] = $this;

        $names = array_map(function($category) use ($options, $includelinks) {
            if ($includelinks) {
                return html_writer::link($category->get_view_link(), $category->get_formatted_name($options));
            } else {
                return $category->get_formatted_name($options);
            }

        }, $categories);

        return implode($separator, $names);
    }