- ⌂ 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_dimensions()
Return an associative array of dimension objects for this variant, where the key is the dimension object OID. For example, if this object's Content Type has a Language Dimension field set to English, the English Language Dimension object will be returned.
Prototype
array get_dimensions()
Return
An associative array of dimension objects for this variant, where the key is the dimension object OID.
Example
$repo = \comand::repo();
$page = $repo->get_first('FROM WebPage LIMIT 1');
$dimensions = $page->get_dimensions();
foreach($dimensions as $oid => $dimension) {
echo("OID=" . $OID . ", Language=" . $dimension->Title . "\n");
}
Related
get_all_dimensions(), get_variant(), ContentType::supports_dimensions()