当前位置: 首页>>代码示例>>PHP>>正文


PHP BaseObject::getPartnerId方法代码示例

本文整理汇总了PHP中BaseObject::getPartnerId方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseObject::getPartnerId方法的具体用法?PHP BaseObject::getPartnerId怎么用?PHP BaseObject::getPartnerId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BaseObject的用法示例。


在下文中一共展示了BaseObject::getPartnerId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getScope

 public function getScope()
 {
     $scope = parent::getScope();
     if (method_exists($this->object, 'getPartnerId')) {
         $scope->setPartnerId($this->object->getPartnerId());
     }
     return $scope;
 }
开发者ID:DBezemer,项目名称:server,代码行数:8,代码来源:kObjectChangedEvent.php

示例2: getScope

 public function getScope()
 {
     $scope = parent::getScope();
     if ($this->raisedJob) {
         $scope->setPartnerId($this->raisedJob->getPartnerId());
         $scope->setParentRaisedJob($this->raisedJob);
     } elseif (method_exists($this->object, 'getPartnerId')) {
         $scope->setPartnerId($this->object->getPartnerId());
     }
     return $scope;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:11,代码来源:kApplicativeEvent.php

示例3: shouldConsumeDataChangedEvent

 public function shouldConsumeDataChangedEvent(BaseObject $object, $previousVersion = null)
 {
     if (class_exists('CaptionAsset') && $object instanceof CaptionAsset) {
         return CaptionSearchPlugin::isAllowedPartner($object->getPartnerId());
     }
     return false;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:7,代码来源:kCaptionSearchFlowManager.php

示例4: shouldConsumeCreatedEvent

 public function shouldConsumeCreatedEvent(BaseObject $object)
 {
     if ($object instanceof flavorParamsOutputWrap && $object->getType() == WidevinePlugin::getAssetTypeCoreValue(WidevineAssetType::WIDEVINE_FLAVOR) && $this->shouldSyncWidevineRepositoryForPartner($object->getPartnerId())) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:kubrickfr,项目名称:server,代码行数:8,代码来源:kWidevineEventsConsumer.php

示例5: objectDeleted

 public function objectDeleted(BaseObject $object, BatchJob $raisedJob = null)
 {
     $shortLinks = ShortLinkPeer::retrieveByKuserId($object->getId(), $object->getPartnerId());
     foreach ($shortLinks as $shortLink) {
         $shortLink->setStatus(ShortLinkStatus::DELETED);
         $shortLink->save();
     }
     return true;
 }
开发者ID:DBezemer,项目名称:server,代码行数:9,代码来源:kShortLinkFlowManager.php

示例6: objectDeleted

 /**
  * @param BaseObject $object
  * @param BatchJob $raisedJob
  * @return bool true if should continue to the next consumer
  */
 public function objectDeleted(BaseObject $object, BatchJob $raisedJob = null)
 {
     if ($object instanceof asset && EdgeCastPlugin::isAllowedPartner($object->getPartnerId())) {
         self::purgeAssetFromEdgeCast($object);
     }
     if ($object instanceof entry && EdgeCastPlugin::isAllowedPartner($object->getPartnerId())) {
         self::purgeEntryFromEdgeCast($object);
     }
     return true;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:15,代码来源:kEdgeCastFlowManager.php

示例7: contribute

 /**
  * @param BaseObject $object
  * @param SimpleXMLElement $mrss
  * @param kMrssParameters $mrssParams
  * @return SimpleXMLElement
  */
 public function contribute(BaseObject $object, SimpleXMLElement $mrss, kMrssParameters $mrssParams = null)
 {
     if (!$object instanceof entry) {
         return;
     }
     $children = entryPeer::retrieveChildEntriesByEntryIdAndPartnerId($object->getId(), $object->getPartnerId());
     if (!count($children)) {
         return;
     }
     $childrenNode = $mrss->addChild('children');
     $childrenDom = dom_import_simplexml($childrenNode);
     foreach ($children as $child) {
         $childXML = kMrssManager::getEntryMrssXml($child);
         $childDom = dom_import_simplexml($childXML);
         $childDom = $childrenDom->ownerDocument->importNode($childDom, true);
         $childrenDom->appendChild($childDom);
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:24,代码来源:KalturaParentContributedPlugin.php

示例8: copyMetadata

 /**
  * @param KalturaMetadataObjectType $objectType
  * @param BaseObject $fromObject
  * @param BaseObject $toObject
  */
 protected function copyMetadata($objectType, BaseObject $fromObject, BaseObject $toObject)
 {
     KalturaLog::debug("Copy metadata type [{$objectType}] from " . get_class($fromObject) . '[' . $fromObject->getId() . "] to[" . $toObject->getId() . "]");
     $c = new Criteria();
     $c->add(MetadataPeer::OBJECT_TYPE, $objectType);
     $c->add(MetadataPeer::OBJECT_ID, $fromObject->getId());
     $metadatas = MetadataPeer::doSelect($c);
     foreach ($metadatas as $metadata) {
         $newMetadata = $metadata->copy();
         $newMetadata->setObjectId($toObject->getId());
         $newMetadata->setPartnerId($toObject->getPartnerId());
         $metadataProfileId = kObjectCopyHandler::getMappedId('MetadataProfile', $metadata->getMetadataProfileId());
         if ($metadataProfileId) {
             $metadataProfile = MetadataProfilePeer::retrieveById($metadataProfileId);
             if ($metadataProfile) {
                 $newMetadata->setMetadataProfileId($metadataProfileId);
                 $newMetadata->setMetadataProfileVersion($metadataProfile->getVersion());
             }
         }
         $newMetadata->save();
         kFileSyncUtils::createSyncFileLinkForKey($newMetadata->getSyncKey(Metadata::FILE_SYNC_METADATA_DATA), $metadata->getSyncKey(Metadata::FILE_SYNC_METADATA_DATA), false);
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:28,代码来源:kMetadataObjectCopiedHandler.php

示例9: objectChanged

 public function objectChanged(BaseObject $object, array $modifiedColumns)
 {
     // if changed object is entry
     if ($object instanceof entry && in_array(entryPeer::MODERATION_STATUS, $modifiedColumns) && $object->getModerationStatus() == entry::ENTRY_MODERATION_STATUS_APPROVED) {
         $externalStorages = StorageProfilePeer::retrieveAutomaticByPartnerId($object->getPartnerId());
         foreach ($externalStorages as $externalStorage) {
             if ($externalStorage->getTrigger() == StorageProfile::STORAGE_TEMP_TRIGGER_MODERATION_APPROVED) {
                 self::exportEntry($object, $externalStorage);
             }
         }
     }
     // if changed object is flavor asset
     if ($object instanceof flavorAsset && !$object->getIsOriginal() && in_array(assetPeer::STATUS, $modifiedColumns) && $object->isLocalReadyStatus()) {
         $entry = $object->getentry();
         $externalStorages = StorageProfilePeer::retrieveAutomaticByPartnerId($object->getPartnerId());
         foreach ($externalStorages as $externalStorage) {
             if ($externalStorage->triggerFitsReadyAsset($entry->getId())) {
                 self::exportFlavorAsset($object, $externalStorage);
             }
         }
     }
     return true;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:23,代码来源:kStorageExporter.php

示例10: shouldConsumeChangedEvent

 public function shouldConsumeChangedEvent(BaseObject $object, array $modifiedColumns)
 {
     if ($object instanceof Permission && $object->getPartnerId() && in_array($object->getType(), self::$partnerLevelPermissionTypes) && in_array(PermissionPeer::STATUS, $modifiedColumns) && $object->getStatus() == PermissionStatus::ACTIVE) {
         return true;
     }
     return false;
 }
开发者ID:kubrickfr,项目名称:server,代码行数:7,代码来源:kMetadataObjectCopiedHandler.php

示例11: setPartnerIdForObj

 public static function setPartnerIdForObj(BaseObject $obj)
 {
     if (self::$s_set_partner_id_policy == self::PARTNER_SET_POLICY_NONE) {
         return;
     }
     if ($obj == null) {
         return;
     }
     $current_obj_partner = $obj->getPartnerId();
     if (self::$s_set_partner_id_policy == self::PARTNER_SET_POLICY_IF_NULL && $current_obj_partner == null) {
         $obj->setPartnerId(self::$s_current_partner_id);
         return;
     }
     // force
     $obj->setPartnerId(self::$s_current_partner_id);
 }
开发者ID:dozernz,项目名称:server,代码行数:16,代码来源:myPartnerUtils.class.php

示例12: setDisplayInSearch

 /**
 	Will set the 'display_in_search' field according to business-logic per object type
 	// kuser | kshow | entry
 	// for objects that are search worthy - search_text will hold text from relevant columns depending on the object type 
 */
 public static function setDisplayInSearch(BaseObject $obj, $parent_obj = null)
 {
     if ($obj == null) {
         return;
     }
     // update the displayInSearch with the logic above only when the object is new or null
     if ($obj->isNew() || $obj->getDisplayInSearch() === null) {
         $res = myPartnerUtils::shouldDisplayInSearch($obj->getPartnerId());
         $obj_id = $obj->getId();
         if ($obj_id && is_numeric($obj_id)) {
             self::setRes($res, $obj_id > entry::MINIMUM_ID_TO_DISPLAY);
         }
         if ($res) {
             if ($obj instanceof kuser) {
                 // if the status is not
                 self::setRes($res, $obj->getStatus() == KuserStatus::ACTIVE);
             } elseif ($obj instanceof kshow) {
                 self::setRes($res, $obj->getViewPermissions() == kshow::KSHOW_PERMISSION_EVERYONE || $obj->getViewPermissions() == null);
                 // if the viewPermission changed from kshow::KSHOW_PERMISSION_EVERYONE to something else
                 // update all entries
                 if ($res && $obj->isColumnModified(kshowPeer::VIEW_PERMISSIONS)) {
                     $entries = $obj->getentrys();
                     foreach ($entries as $entry) {
                         // run this code for each entry
                         self::setDisplayInSearch($entry, $obj);
                     }
                 }
             } elseif ($obj instanceof entry) {
                 // status=READY , type=MEDIACLIP, view permissions of kshow
                 self::setRes($res, true);
             } else {
                 throw new Exception("mySearchUtils::setDisplayInSearch - cannot handle objects of type " . get_class($obj));
             }
         }
         $obj->setDisplayInSearch($res);
     } else {
         // if not new - use the value from the object
         $res = $obj->getDisplayInSearch();
     }
     //	echo __METHOD__ . " (" . get_class ( $obj ) . ") res [$res]\n";
     $words = "";
     $fields_to_use = $obj->getColumnNames();
     foreach ($fields_to_use as $field) {
         $field_str = $obj->getByName($field, BasePeer::TYPE_FIELDNAME);
         //  call_user_func ( array ( $obj , $func_name ) );
         $words .= " " . $field_str;
     }
     $extra_invisible_data = null;
     if ($obj instanceof kshow) {
         $type = $obj->getType();
         if (empty($type)) {
             $type = kshow::KSHOW_TYPE_OTHER;
         }
         // add the category to the search
         $words .= " _CAT_" . $type;
     } elseif ($obj instanceof entry) {
         $extra_invisible_data = "_MEDIA_TYPE_" . $obj->getMediaType();
         $type = $obj->getType();
         // add the SEARCH_ENTRY_TYPE_RC to the words
         if ($type == entryType::MIX) {
             $extra_invisible_data .= " " . self::SEARCH_ENTRY_TYPE_RC;
         }
     }
     $prepared_text = self::prepareSearchText($words);
     $partner_id = $obj->getPartnerId();
     // if res == 1 - only for partner , if == 2 - also for kaltura network
     $obj->setSearchText(self::addPartner($partner_id, $prepared_text, $res, $extra_invisible_data));
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:73,代码来源:mySearchUtils.class.php

示例13: shouldConsumeDeletedEvent

 /**
  * @param BaseObject $object
  * @return bool true if the consumer should handle the event
  */
 public function shouldConsumeDeletedEvent(BaseObject $object)
 {
     if ($object instanceof FileSync) {
         if (!PermissionPeer::isValidForPartner(PermissionName::FEATURE_REMOTE_STORAGE, $object->getPartnerId())) {
             return false;
         }
         if ($object->getFileType() == FileSync::FILE_SYNC_FILE_TYPE_URL) {
             $storage = StorageProfilePeer::retrieveByPK($object->getDc());
             if ($storage->getStatus() == StorageProfile::STORAGE_STATUS_AUTOMATIC && $storage->getAllowAutoDelete()) {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:DBezemer,项目名称:server,代码行数:19,代码来源:kStorageExporter.php

示例14: getSearchData

 /**
  * Return textual search data to be associated with the object
  * 
  * @param BaseObject $object
  * @return string
  */
 public static function getSearchData(BaseObject $object)
 {
     if ($object instanceof entry) {
         if (self::isAllowedPartner($object->getPartnerId())) {
             return kMetadataManager::getSearchValuesByObject(Metadata::TYPE_ENTRY, $object->getId());
         }
     }
     return null;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:15,代码来源:MetadataPlugin.php

示例15: objectCreated

 public function objectCreated(BaseObject $object)
 {
     if ($object instanceof Permission) {
         // changes in permissions for partner, may require new cache generation
         if ($object->getPartnerId() != PartnerPeer::GLOBAL_PARTNER) {
             self::markPartnerRoleCacheDirty($object->getPartnerId());
             return true;
         }
     }
     if ($object instanceof PermissionToPermissionItem) {
         $permission = $object->getPermission();
         if ($permission && $permission->getPartnerId() != PartnerPeer::GLOBAL_PARTNER) {
             self::markPartnerRoleCacheDirty($permission->getPartnerId());
             return true;
         }
     }
     return true;
 }
开发者ID:kubrickfr,项目名称:server,代码行数:18,代码来源:kPermissionManager.php


注:本文中的BaseObject::getPartnerId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。