Skip to the content
Documentation

Group_by_attribute, false() not working

No ratings yet

The source code says that the group_by_attribute defaults to FALSE but the this documentation says it defaults to TRUE. In any case setting it to false() causes it to fail to return anything.

// Fetches reverse related objects array
$FunctionList['reverse_related_objects'] = array( 'name' => 'object',
                                 'operation_types' => array( 'read' ),
                                 'call_method' => array( 'include_file' => 'kernel/content/ezcontentfunctioncollection.php',
                                                         'class' => 'eZContentFunctionCollection',
                                                         'method' => 'fetchReverseRelatedObjects' ),
                                 'parameter_type' => 'standard',
                                 'parameters' => array( array( 'name' => 'object_id',
                                                               'type' => 'integer',
                                                               'required' => true ),
                                                        array( 'name' => 'attribute_identifier',
                                                               'type' => 'string',
                                                               'required' => false ),
                                                        array( 'name' => 'all_relations',
                                                               'type' => 'boolean',
                                                               'required' => false,
                                                               'default' => false ),
                                                        array( 'name' => 'group_by_attribute',
                                                               'type' => 'boolean',
                                                               'required' => false,
                                                               'default' => false ),
                                                        array( 'name' => 'sort_by',
                                                               'type' => 'array',
                                                               'required' => false,
                                                               'default' => array() ),
                                                        array( 'name' => 'ignore_visibility',
                                                               'type' => 'boolean',
                                                               'required' => false,
                                                               'default' => null ) ) );

Comments (1 historical)

Written by readers of the earlier documentation sites, kept as they were.

  1. Re: Group_by_attribute, false() not working

    Luc ·

    However kernel/classes/ezcontentobject.php actually defaults this to FALSE

    function &relatedContentObjectList( $fromObjectVersion = false,                                        $fromObjectID = false,                                        $attributeID = 0,                                        $groupByAttribute = false,                                        $params = false )    {