- ⌂ cObject
- Methods
- Constructor
- add_variant()
- approve()
- as_array()
- can_add_variant()
- can_delete_variant()
- can_edit_variant()
- can_reorder_variant()
- clone()
- delete()
- edit_variant()
- enum()
- get_active_object()
- get_all_variants()
- get_attributes()
- get_dimensions()
- get_dimension_with()
- get_parent()
- get_primary_cpath()
- get_variant()
- Keywords()
- lock_object()
- reload_data()
- repo()
- revert()
- save()
- store()
- unlock_object()
- update_from_array()
- validate()
cObject::get_primary_cpath()
Return the "primary cPath" of an object. The primary cPath is based on the first folder/collection that an object was added to or referenced from, all the way up the repository hierarchy to the root object. If an object is not referenced from another object, the cPath will simply identify the object with a simple OID-based filter (ie. [OID=123]).
Prototype
cpath get_primary_cpath(boolean $self = TRUE)
Parameters
- $self - If TRUE, this object include be included at the end of the resulting cPath.
Return
Primary cPath used to access the object.
Example
$repo = \comand::repo();
$contact = $repo->get_first('FROM Contact');
$cpath = $contact->get_primary_cpath();
echo("cPath=$cpath");