- ⌂ 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_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");
}