- ⌂ 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_dimension_with()
Return an array of dimensions associated with an object variant. Optionally include the "*" (star wildcard) as a string in the last element in the array, to allow fallback if the return values are not available.
If the object has multiple dimensions, the first element in the array may be an array of dimensions itself that represents the primary with clause, followed by additional dimensions as fallbacks, potentially followed by the '*' string if $star is specified.
Prototype
array get_dimensions_with(boolean $star = FALSE)
Parameters
- star - If TRUE, will include "*" as last element in the resulting array, if there are dimensions. If FALSE (default), no "*" element will be returned.
Return
An array that contains each dimension object that represents the primary WITH clause that could be used to select this object. If the object has multiple dimensions, the first element in the array may be an array of dimensions itself that represents the primary with clause, followed by additional dimensions as fallbacks, potentially followed by the '*' string if $star is specified.
Example
// get all contacts in the same dimension as the first found
$repo = \comand::repo();
$obj = $repo->get_object_by_oid(123);
$dimensions = $obj->get_dimension_with();
echo("Dimensions WITH: " . print_r($dimensions, TRUE));