예제 #1
0
파일: kFlowHelper.php 프로젝트: wzur/server
 protected static function getReplacingEntry($recordedEntry, $asset)
 {
     $replacingEntryId = $recordedEntry->getReplacingEntryId();
     $replacingEntry = null;
     if (!is_null($replacingEntryId)) {
         $replacingEntry = entryPeer::retrieveByPKNoFilter($replacingEntryId);
         if ($replacingEntry) {
             $replacingAsset = assetPeer::retrieveByEntryIdAndParams($replacingEntryId, $asset->getFlavorParamsId());
             if ($replacingAsset) {
                 KalturaLog::debug("Entry in replacement, deleting - [" . $replacingEntryId . "]");
                 myEntryUtils::deleteReplacingEntry($recordedEntry, $replacingEntry);
                 $replacingEntry = null;
             }
         }
     }
     if (is_null($replacingEntry)) {
         $replacingEntry = self::createReplacigEntry($recordedEntry);
     }
     return $replacingEntry;
 }