$object->parent

Posted on 2005-07-13 20:02:20 EEST.

I even didn't know that using gnome application with midgard can be so easy and flexible :)
This time I try drivel , it's looks much better than BloGTK , thank you Smallone!.

Following tariej's suggestion I wrote simple parent method today.
What it really does? Just returns class name of object's parent type. Pay attention. Not parent class name which was extended but parent class name which is parent in midgard's tree.

Here's brief definition from schema:
type name="NewMidgardArticle" parent="NewMidgardTopic"


Let's look at example:

$article = new NewMidgardArticle();
$parent = $article->parent()
print $parent;

output:
NewMidgardTopic

impressive? ;)

Back

Layout Copyright © 2006 Finnish Teleservice Center Ltd Oy - Site Powered by Midgard CMS