public function objectCreated(BaseObject $fromObject) { if ($fromObject instanceof entry) { $liveEntryId = $fromObject->getRootEntryId(); $this->copyLiveMetadata($fromObject, $liveEntryId); } return true; }
public function objectCreated(BaseObject $object) { /* @var $object entry */ $rootEntryId = $object->getRootEntryId(); if (!$rootEntryId) { return true; } $liveEntry = entryPeer::retrieveByPK($rootEntryId); if (!$liveEntry) { KalturaLog::debug("Live entry with id [{$object->getRootEntryId()}] not found, categories will not be copied"); return true; } /* @var $liveEntry LiveEntry */ $recordingOptions = $liveEntry->getRecordingOptions(); if (!$recordingOptions) { return true; } /* @var $recordingOptions kLiveEntryRecordingOptions */ if ($recordingOptions->getShouldCopyEntitlement()) { $this->syncEntryEntitlementInfo($object, $liveEntry); $this->syncCategoryEntries($object, $liveEntry); } return true; }