public function groupByDataboxIdAndCollectionId()
    {
        $groups = [];

        foreach ($this->references as $index => $reference) {
            $databoxId = $reference->getDataboxId();
            $group = isset($groups[$databoxId]) ? $groups[$databoxId] : [];

            $group[$reference->getCollectionId()] = $index;
            $groups[$databoxId] = $group;
        }

        return $groups;
    }
public function groupByDataboxIdAndCollectionId()
    {
        $groups = [];

        foreach ($this->references as $index => $reference) {
            $databoxId = $reference->getDataboxId();
            $group = isset($groups[$databoxId]) ? $groups[$databoxId] : [];

            $group[$reference->getCollectionId()] = $index;
            $groups[$databoxId] = $group;
        }

        return $groups;
    }
public function groupByDataboxIdAndCollectionId ( ) { $ groups = [ ] ; foreach ( $ this -> references as $ index => $ reference ) { $ databoxId = $ reference -> getDataboxId ( ) ; $ group = isset ( $ groups [ $ databoxId ] ) ? $ groups [ $ databoxId ] : [ ] ; $ group [ $ reference -> getCollectionId ( ) ] = $ index ; $ groups [ $ databoxId ] = $ group ; } return $ groups ; }
Returns an array of array with actual index as leaf value.

@return array<int,array<int,mixed>>
Returns an array of array with actual index as leaf value .