public static function getObjectClass($baseClass, $enumValue) { if ($baseClass == 'entry' && $enumValue == ExternalMediaPlugin::getEntryTypeCoreValue(ExternalMediaEntryType::EXTERNAL_MEDIA)) { return 'ExternalMediaEntry'; } if ($baseClass == 'KalturaBaseEntry' && $enumValue == ExternalMediaPlugin::getEntryTypeCoreValue(ExternalMediaEntryType::EXTERNAL_MEDIA)) { return 'KalturaExternalMediaEntry'; } return null; }
public function toObject($coreFilter = null, $skip = array()) { /* @var $coreFilter entryFilter */ if ($this->externalSourceTypeEqual) { $coreFilter->fields['_like_plugins_data'] = ExternalMediaPlugin::getExternalSourceSearchData($this->externalSourceTypeEqual); $this->externalSourceTypeEqual = null; } if ($this->externalSourceTypeIn) { $coreExternalSourceTypes = array(); $apiExternalSourceTypes = explode(',', $this->externalSourceTypeIn); foreach ($apiExternalSourceTypes as $apiExternalSourceType) { $coreExternalSourceType = kPluginableEnumsManager::apiToCore('ExternalMediaSourceType', $apiExternalSourceType); $coreExternalSourceTypes[] = ExternalMediaPlugin::getExternalSourceSearchData($coreExternalSourceType); } $externalSourceTypeIn = implode(',', $coreExternalSourceTypes); $coreFilter->fields['_mlikeor_plugins_data'] = $externalSourceTypeIn; $this->externalSourceTypeIn = null; } return parent::toObject($coreFilter, $skip); }
/** * @return array */ public static function getAdditionalDescriptions() { return array(ExternalMediaPlugin::getApiValue(self::EXTERNAL_MEDIA) => 'External Media'); }
/** * Delete a external media entry. * * @action delete * @param string $id External media entry id to delete * * @throws KalturaErrors::ENTRY_ID_NOT_FOUND * @validateUser entry id edit */ function deleteAction($id) { $this->deleteEntry($id, ExternalMediaPlugin::getEntryTypeCoreValue(ExternalMediaEntryType::EXTERNAL_MEDIA)); }
/** * Define the entry type */ public function __construct() { $this->type = ExternalMediaPlugin::getApiValue(ExternalMediaEntryType::EXTERNAL_MEDIA); }