コード例 #1
0
 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;
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 /**
  * @return array
  */
 public static function getAdditionalDescriptions()
 {
     return array(ExternalMediaPlugin::getApiValue(self::EXTERNAL_MEDIA) => 'External Media');
 }
コード例 #4
0
 /**
  * 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));
 }
コード例 #5
0
 /**
  * Define the entry type
  */
 public function __construct()
 {
     $this->type = ExternalMediaPlugin::getApiValue(ExternalMediaEntryType::EXTERNAL_MEDIA);
 }