Newscoop\Entity\Playlist::getThemes PHP Метод

getThemes() публичный Метод

Provides the themes attached to playlist.
public getThemes ( ) : string
Результат string
    public function getThemes()
    {
        if (!$this->themes) {
            return array();
        }
        return json_decode($this->themes, true);
    }

Usage Example

Пример #1
0
 /**
  * Clear cache for all temlates assigned to playlist.
  *
  * @param Playlist $playlist
  */
 public function clearPlaylistTemplates($playlist)
 {
     foreach ($playlist->getThemes() as $theme) {
         if (is_array($theme)) {
             foreach ($theme as $file) {
                 \TemplateCacheHandler_DB::clean($file);
             }
         }
     }
 }