webCOMAND

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()