public function validateForUsage($sourceObject, $propertiesToSkip = array()) { parent::validateForUsage($sourceObject, $propertiesToSkip); $this->validatePropertyNotNull('eventNotificationTemplateId'); myPartnerUtils::addPartnerToCriteria('EventNotificationTemplate', kCurrentContext::getCurrentPartnerId(), true); $eventNotificationTemplate = EventNotificationTemplatePeer::retrieveByPK($this->eventNotificationTemplateId); if (is_null($eventNotificationTemplate)) { throw new KalturaAPIException(KalturaEventNotificationErrors::EVENT_NOTIFICATION_TEMPLATE_NOT_FOUND, $this->eventNotificationTemplateId); } }
public function validateForUsage($sourceObject, $propertiesToSkip = array()) { parent::validateForUsage($sourceObject, $propertiesToSkip); $this->validatePropertyNotNull('metadataProfileId'); $this->validatePropertyNotNull('metadataObjectType'); $this->validatePropertyNotNull('xslt'); myPartnerUtils::addPartnerToCriteria('MetadataProfile', kCurrentContext::getCurrentPartnerId(), true); $metadataProfile = MetadataProfilePeer::retrieveByPK($this->metadataProfileId); if (is_null($metadataProfile)) { throw new KalturaAPIException(MetadataErrors::METADATA_PROFILE_NOT_FOUND, $this->metadataProfileId); } }