Midgard Constants

From OpenPSA Wiki

Jump to: navigation, search

These constants are internal and should be used with mgd_get_class_data function or with object's get_data method as their parameter when you want to get particular property or data:

  • MGD_META_PROPERTY_PARENT

to get property name which holds ID or GUID which points to parent object's primary property

  • MGD_META_PROPERTY_UP

to get property name which holds ID or GUID which points to up object's primary property

  • MGD_META_PROPERTY_PRIMARY

to get property which is used as primary one ( e.g. ID or GUID )

  • MGD_META_TREE_PARENT

to get parent class name which is parent one in midgard tree

  • MGD_META_TREE_CHILDS

to get all child classes' names

Example code:

<?php
 $article = new MidgardArticle();
 $parent = $article->get_data(MGD_META_PROPERTY_PARENT);
?>
Personal tools