src/CampaignAdmin.php
protected function getListResource()
    {
        $items = $this->getListItems();
        $count = $items->count();
        /** @var string $treeClass */
        $treeClass = $this->config()->get('tree_class');
        $hal = [
            'count' => $count,
            'total' => $count,
            '_links' => [
                'self' => [
                    'href' => $this->Link('items')
                ]
            ],
            '_embedded' => [$treeClass => []]
        ];
        /** @var ChangeSet $item */
        foreach ($items as $item) {
            $sync = $this->shouldCampaignSync($item);
            $resource = $this->getChangeSetResource($item, $sync);
            $hal['_embedded'][$treeClass][] = $resource;
        }
        return $hal;
    }
protected function getListResource()
    {
        $items = $this->getListItems();
        $count = $items->count();
        /** @var string $treeClass */
        $treeClass = $this->config()->get('tree_class');
        $hal = [
            'count' => $count,
            'total' => $count,
            '_links' => [
                'self' => [
                    'href' => $this->Link('items')
                ]
            ],
            '_embedded' => [$treeClass => []]
        ];
        /** @var ChangeSet $item */
        foreach ($items as $item) {
            $sync = $this->shouldCampaignSync($item);
            $resource = $this->getChangeSetResource($item, $sync);
            $hal['_embedded'][$treeClass][] = $resource;
        }
        return $hal;
    }
protected function getListResource ( ) { $ items = $ this -> getListItems ( ) ; $ count = $ items -> count ( ) ; /** @var string $treeClass */ $ treeClass = $ this -> config ( ) -> get ( 'tree_class' ) ; $ hal = [ 'count' => $ count , 'total' => $ count , '_links' => [ 'self' => [ 'href' => $ this -> Link ( 'items' ) ] ] , '_embedded' => [ $ treeClass => [ ] ] ] ; /** @var ChangeSet $item */ foreach ( $ items as $ item ) { $ sync = $ this -> shouldCampaignSync ( $ item ) ; $ resource = $ this -> getChangeSetResource ( $ item , $ sync ) ; $ hal [ '_embedded' ] [ $ treeClass ] [ ] = $ resource ; } return $ hal ; }
Get list contained as a hal wrapper

@return array
Get list contained as a hal wrapper