public function getGrouped()
    {
        $types = [];
        $elements = $this->toArray();
        /** @var Entity\Relations $element */
        foreach ($elements as $element) {
            $type = $element->get('to_contenttype');
            $types[$type][] = $element;
        }

        return $types;
    }
public function getGrouped()
    {
        $types = [];
        $elements = $this->toArray();
        /** @var Entity\Relations $element */
        foreach ($elements as $element) {
            $type = $element->get('to_contenttype');
            $types[$type][] = $element;
        }

        return $types;
    }
public function getGrouped ( ) { $ types = [ ] ; $ elements = $ this -> toArray ( ) ; /** @var Entity\Relations $element */ foreach ( $ elements as $ element ) { $ type = $ element -> get ( 'to_contenttype' ) ; $ types [ $ type ] [ ] = $ element ; } return $ types ; }
Get the related types that are in the collection, grouped by ContentType key.

@internal

@return array
Get the related types that are in the collection grouped by ContentType key .