Papi_Page_Type::get_child_types PHP Method

get_child_types() public method

Get child page types that lives under the current page type.
public get_child_types ( ) : array
return array
    public function get_child_types()
    {
        $child_types = [];
        foreach (papi_to_array($this->child_types) as $id) {
            $child_type = papi_get_entry_type_by_id($id);
            if ($child_type instanceof Papi_Page_Type) {
                $child_types[] = $child_type;
            }
        }
        return $child_types;
    }