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; }