webCOMAND

cObject::get_all_variants()

Return an array that contains each defined version of this object for a unique dimension.

If the object content type is or extends cObject, and not Content, this method will always return the object itself, since cObjects cannot have dimensions.

Prototype

array get_all_variants()

Return

An array that contains each defined versions of this object for a unique dimension.

Example

$repo = \comand::repo();
$contact = $repo->get_first('FROM Contact LIMIT 1');
$variants = $contact->get_all_variants();
foreach($variants as $variants) {
    echo("DOID=" . $variants->DOID . ", Language=" . $variants->Language . "\n");
}

Related

has_dimensions()