page_name,page_id,page_title,content,keywords,language,original_page
getChildren,126,"getChildren Delegate Class Method","Return to [[Delegate class methods]]

[[toc]]

The getChildren() method can be implemented in a table's delegate class to specify the logical ""child"" records of a given record which can be used when creating hierarchical applications.  This method will effectively override the output of the Dataface_Record::getChildren() method for records of this table.

===Signature===

<code>
function getChildren( Dataface_Record $record) : Dataface_Record[]
</code>

===Parameters===

# '''$record''' - The Dataface_Record that is the subject of the query 

===Returns===

This method should return an array of Dataface_Record objects that are considered to be children of the subject record.

===Examples===

<code>
function getChildren($record){
    return df_get_records('webpages', 
        array(
            'parent_id'=>'='.$record->val('webpage_id')
        )
    );
}
</code>


==See Also==

* '''[[getParent]]''' - A Delegate class method to return the logical parent of a given record.","getChildren Delegate class method",en,
