src/Sulu/Component/SmartContent/Orm/BaseDataProvider.php
protected function decorateResourceItems(array $data, $locale)
    {
        return array_map(
            function($item) {
                $itemData = $this->serializer->serialize($item, 'array', $this->getSerializationContext());
                $id = $this->getIdForItem($item);

                if ($this->referenceStore) {
                    $this->referenceStore->add($id);
                }

                return new ArrayAccessItem($id, $itemData, $item);
            },
            $data
        );
    }
protected function decorateResourceItems(array $data, $locale)
    {
        return array_map(
            function($item) {
                $itemData = $this->serializer->serialize($item, 'array', $this->getSerializationContext());
                $id = $this->getIdForItem($item);

                if ($this->referenceStore) {
                    $this->referenceStore->add($id);
                }

                return new ArrayAccessItem($id, $itemData, $item);
            },
            $data
        );
    }
protected function decorateResourceItems ( array $ data , $ locale ) { return array_map ( function ( $ item ) { $ itemData = $ this -> serializer -> serialize ( $ item , 'array' , $ this -> getSerializationContext ( ) ) ; $ id = $ this -> getIdForItem ( $ item ) ; if ( $ this -> referenceStore ) { $ this -> referenceStore -> add ( $ id ) ; } return new ArrayAccessItem ( $ id , $ itemData , $ item ) ; } , $ data ) ; }
Decorates result as resource item.

@param array $data
@param string $locale

@return ArrayAccessItem[]
Decorates result as resource item .