src/Entity/XiboPlaylist.php
public function get(array $params = [])
    {
        $this->getLogger()->info('Getting list of Playlists');
        if (isset($params['embed']))
            $embed = ($params['embed'] != null) ? explode(',', $params['embed']) : [];

        $hydratedWidgets = [];
        $entries = [];

        $response = $this->doGet('/playlist', $params);
        foreach ($response as $item) {
            /** @var XiboPlaylist $playlist */
            $playlist = new XiboPlaylist($this->getEntityProvider());
            $playlist->hydrate($item);
            if (in_array('widgets', $embed) === true) {
                foreach ($playlist->widgets as $widget) {
                    /** @var XiboWidget $widgetObject */
                    $widgetObject = new XiboWidget($this->getEntityProvider());
                    $widgetObject->hydrate($widget);
                    $hydratedWidgets[] = $widgetObject;
                }
                $playlist->widgets = $hydratedWidgets;
            }
            $entries[] = clone $playlist;
        }

        return $entries;
    }
public function get(array $params = [])
    {
        $this->getLogger()->info('Getting list of Playlists');
        if (isset($params['embed']))
            $embed = ($params['embed'] != null) ? explode(',', $params['embed']) : [];

        $hydratedWidgets = [];
        $entries = [];

        $response = $this->doGet('/playlist', $params);
        foreach ($response as $item) {
            /** @var XiboPlaylist $playlist */
            $playlist = new XiboPlaylist($this->getEntityProvider());
            $playlist->hydrate($item);
            if (in_array('widgets', $embed) === true) {
                foreach ($playlist->widgets as $widget) {
                    /** @var XiboWidget $widgetObject */
                    $widgetObject = new XiboWidget($this->getEntityProvider());
                    $widgetObject->hydrate($widget);
                    $hydratedWidgets[] = $widgetObject;
                }
                $playlist->widgets = $hydratedWidgets;
            }
            $entries[] = clone $playlist;
        }

        return $entries;
    }
public function get ( array $ params = [ ] ) { $ this -> getLogger ( ) -> info ( 'Getting list of Playlists' ) ; if ( isset ( $ params [ 'embed' ] ) ) $ embed = ( $ params [ 'embed' ] != null ) ? explode ( ',' , $ params [ 'embed' ] ) : [ ] ; $ hydratedWidgets = [ ] ; $ entries = [ ] ; $ response = $ this -> doGet ( '/playlist' , $ params ) ; foreach ( $ response as $ item ) { /** @var XiboPlaylist $playlist */ $ playlist = new XiboPlaylist ( $ this -> getEntityProvider ( ) ) ; $ playlist -> hydrate ( $ item ) ; if ( in_array ( 'widgets' , $ embed ) === true ) { foreach ( $ playlist -> widgets as $ widget ) { /** @var XiboWidget $widgetObject */ $ widgetObject = new XiboWidget ( $ this -> getEntityProvider ( ) ) ; $ widgetObject -> hydrate ( $ widget ) ; $ hydratedWidgets [ ] = $ widgetObject ; } $ playlist -> widgets = $ hydratedWidgets ; } $ entries [ ] = clone $ playlist ; } return $ entries ; }
Return a list of playlists.

@param array $params can be filtered by: playlistId, name, userId, tags, mediaLike, embeddable parameter embed=widgets
@return array|XiboPlaylist
Return a list of playlists .