php-constants
midgard-php constants
Midgard-php extension has predefined and registered PHP constants which are initialized when midgard extension is loaded. Read more about PHP constants.
These constants are internal and should be used with mgd_get_class_data function or with get_data object's 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 propertyMGD_META_PROPERTY_UP
to get property name which holds id or guid which points to up obcject's primary propertyMGD_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 treeMGD_META_TREE_CHILDS
to get all child classes' names
Example code:
$article = new midcom_db_article();
$parent = $article->get_data(MGD_META_PROPERTY_PARENT);
print "Property name which holds parent variable is $parent.";
will produce output:
Property name which holds parent variable is topic.
