code/view/json.php
protected function _includeCollection(ModelEntityInterface $entities)
    {
        $result = array('data' => array());

        foreach ($entities as $entity)
        {
            $relation = $this->_includeResource($entity);
            $result['data'][] = $relation['data'];
        }

        return $result;
    }
protected function _includeCollection(ModelEntityInterface $entities)
    {
        $result = array('data' => array());

        foreach ($entities as $entity)
        {
            $relation = $this->_includeResource($entity);
            $result['data'][] = $relation['data'];
        }

        return $result;
    }
protected function _includeCollection ( ModelEntityInterface $ entities ) { $ result = array ( 'data' => array ( ) ) ; foreach ( $ entities as $ entity ) { $ relation = $ this -> _includeResource ( $ entity ) ; $ result [ 'data' ] [ ] = $ relation [ 'data' ] ; } return $ result ; }
Creates resource objects and returns an array of resource identifier objects specified by JSON API

@see   http://jsonapi.org/format/#document-resource-identifier-objects
@param ModelEntityInterface $entities
@return array
Creates resource objects and returns an array of resource identifier objects specified by JSON API