$mgdschema_class
$mgdschema_class :
The Grand Unified Reflector, Tree information
Note, that the request data, for ease of use, already contains the L10n Databases of the Component and MidCOM itself located in this class. They are stored as 'l10n' and 'l10n_midcom'. Also available as 'config' is the current component configuration.
get_component_l10n() : \midcom_services_i18n_l10n
Gets a midcom_helper_l10n instance for component governing the type
Localization library for the reflector object class
get_link_properties() : array
Gets a list of link properties and the links target info
Link info key specification 'class' string link target class name 'target' string link target property (of target class) 'parent' boolean link is link to "parent" in object tree 'up' boolean link is link to "up" in object tree
multidimensional array keyed by property, values are arrays with link info (or false in case of failure)
class_rewrite(string $schema_type) : string
Map extended classes
For example org.openpsa.* components often expand core objects, in config we specify which classes we wish to substitute with which
string | $schema_type | classname to check rewriting for |
new classname (or original in case no rewriting is to be done)
is_same_class(string $class_one, string $class_two) : boolean
See if two MgdSchema classes are the same
NOTE: also takes into account the various extended class scenarios
string | $class_one | first class to compare |
string | $class_two | second class to compare |
response
get_object_title(object $object, string $title_property = null) : string
Resolve the "title" of given object
NOTE: This is distinctly different from get_object_label, which will always return something even if it's just the class name and GUID, also it will for some classes include extra info (like datetimes) which we do not want here.
object | $object | the object to get the name property for |
string | $title_property | property to use as "name", if left to default (null), will be reflected |
value of name property or boolean false on failure
get_title_property(object $object) : string
Resolve the "title" property of given object
NOTE: This is distinctly different from get_label_property, which will always return something even if it's just the guid
object | $object | The object to get the title property for |
Name of property or boolean false on failure
get_title_property_nonstatic(object $object) : string
Resolve the "title" property of given object
NOTE: This is distinctly different from get_label_property, which will always return something even if it's just the guid
object | $object | the object to get the title property for |
name of property or boolean false on failure
get_workflow(string $identifier, array $options = array()) : \midcom\workflow\dialog
string | $identifier | |
array | $options |
get_root_objects(boolean $deleted = false) : array
Get "root" objects for the class this reflector was instantiated for
NOTE: deleted objects can only be listed as admin, also: they do not come MidCOM DBA wrapped (since you cannot normally instantiate such object)
boolean | $deleted | whether to get (only) deleted or not-deleted objects |
of objects or false on failure
get_parent(\midgard_object $object)
Get the parent object of given object
Tries to utilize MidCOM DBA features first but can fallback on pure MgdSchema as necessary
NOTE: since this might fall back to pure MgdSchema never trust that MidCOM DBA features are available, check for is_callable/method_exists first !
\midgard_object | $object | the object to get parent for |
get_child_objects(\midgard_object $object, boolean $deleted = false) : array
Get children of given object
\midgard_object | $object | object to get children for |
boolean | $deleted | whether to get (only) deleted or not-deleted objects |
multidimensional array (keyed by classname) of objects or false on failure
get_tree(\midcom_core_dbaobject $parent) : array
List object children
\midcom_core_dbaobject | $parent |