added button to generate smartblock and playlist for podcast

This commit is contained in:
Robbt 2018-12-12 22:53:28 -05:00
parent cb62cff277
commit 6cd5550721
5 changed files with 52 additions and 0 deletions

View file

@ -167,6 +167,12 @@ class Application_Service_PodcastService
public static function createPodcastSmartblockAndPlaylist($podcast)
{
if (is_array($podcast)) {
$newpodcast = new Podcast();
$newpodcast->fromArray($podcast, BasePeer::TYPE_FIELDNAME);
$podcast = $newpodcast;
}
// Base class
$newBl = new Application_Model_Block();
$newBl->setCreator(Application_Model_User::getCurrentUser()->getId());
$newBl->setName($podcast->getDbTitle());