webCOMAND

cObject::meta()

Return an object metadata property value.

Prototype

string meta(string $property)

Parameters

  • property - One of the following property names, relative to the queried object.  The property names are keywords, so they are expressed without quotes.  For example, META(LastModified).
    • LastModified - The greater-object's Last Modified Timestamp, which is the most recent modification of a top-level object and all of it's embedded objects recursively.  In other words, a top-level object and all of it's embedded objects recursively share the same Last Modified Timestamp.
    • ThisLastModified - The immediate-object's This Last Modified Timestamp, which is the most recent modification to the immediate-object, regardless of whether or not the object is a top-level object or embedded within another object.  In other words, a top-level object may have a different This Last Modified Timestamp than it's embedded children, which are modified independently from the top-level object and other embedded objects.
    • LastModifiedNote - The version note of the greater-object's last modification.
    • ThisLastModifiedNote - The version note of the immediate-object's last modification.
    • LastModifiedRevision - The revision of the greater-object's last modification.
    • ThisLastModifiedRevision - The revision of the immediate-object's last modification.
    • LastCreatedRevision - The revision of the greater-object's creation.
    • ThisCreatedRevision - The revision of the immediate-object's creation.
    • Unsaved - 1 if the greater-object is in an unsaved state, otherwise 0.
    • ThisUnsaved - 1 if the immediate-object is in an unsaved state, otherwise 0.
    • Unapproved - 1 if the greater-object is in an unapproved state, otherwise 0.
    • ThisUnapproved - 1 if the immediate-object is in an unapproved state, otherwise 0.
    • Approved - 1 if the greater-object is in an approved state, otherwise 0.
    • ThisApproved - 1 if the immediate-object is in an approved state, otherwise 0.
    • HasIcon - 1 if the top-level-object has an icon defined (in all variants), otherwise 0.
    • ThisHasIcon - 1 if the immediate-object has an icon defined, otherwise 0.
    • Deleted - 1 if the top-level-object is deleted (in all variants), otherwise 0.
    • ThisDeleted - 1 if the immediate-object is deleted, otherwise 0.
    • ParentOID - OID of the immediate-object's parent OID (an alias for ThisParentOID).
    • ThisParentOID - OID of the immediate-object's parent OID.
    • TopParentOID - OID of the top-most-object.
    • ThisTopParentOID - OID of the top-most-object of the immediate-object, which is always the same as TopParentOID.
    • IsEmbedded - 1 if the immediate-object is embedded, otherwise 0.
    • ThisIsEmbedded - 1 if the immediate-object is embedded, otherwise 0.

Return

The return value depends on the specified property.  See property parameter above.

Example

$repo = \comand::repo();
$contact = $repo->get_first('FROM Contact');

// get all contacts this contact is an Emergency Contact for
$modified = $contact->meta('LastModified');
echo("$contact was last modified: $modified\n");

Related

META(), .META()