/** * Get favourite screens and slide shows. * * @return CTableInfo */ function getFavouriteScreens() { $data = getFavouriteScreensData(); $favourites = (new CTableInfo())->setNoDataMessage(_('No screens added.')); if ($data['screens']) { foreach ($data['screens'] as $screen) { $favourites->addRow([new CLink($screen['label'], 'screens.php?elementid=' . $screen['id'])]); } } if ($data['slideshows']) { foreach ($data['slideshows'] as $slideshow) { $favourites->addRow([new CLink($slideshow['label'], 'slides.php?elementid=' . $slideshow['id'])]); } } return $favourites; }
/** * Get favourite screens and slide shows. * * @return CList */ function getFavouriteScreens() { $data = getFavouriteScreensData(); $favourites = new CList(null, 'favorites', _('No screens added.')); if ($data['screens']) { foreach ($data['screens'] as $screen) { $favourites->addItem(new CLink($screen['label'], 'screens.php?elementid=' . $screen['id']), 'nowrap'); } } if ($data['slideshows']) { foreach ($data['slideshows'] as $slideshow) { $favourites->addItem(new CLink($slideshow['label'], 'slides.php?elementid=' . $slideshow['id']), 'nowrap'); } } return $favourites; }