本文整理汇总了PHP中KalturaObject::validateForUpdate方法的典型用法代码示例。如果您正苦于以下问题:PHP KalturaObject::validateForUpdate方法的具体用法?PHP KalturaObject::validateForUpdate怎么用?PHP KalturaObject::validateForUpdate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KalturaObject
的用法示例。
在下文中一共展示了KalturaObject::validateForUpdate方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validateForUpdate
public function validateForUpdate($sourceObject, $propertiesToSkip = array())
{
parent::validateForUpdate($sourceObject, $propertiesToSkip);
if ($this->partnerId !== null) {
$this->validatePartnerId();
}
$this->validatePropertyMinLength("name", 1, true);
}
示例2: validateForUpdate
public function validateForUpdate($sourceObject, $propertiesToSkip = array())
{
/* @var $sourceObject entry */
$this->validateUsers();
$this->validateCategories();
$this->validatePropertyMinLength('referenceId', 2, true);
// if($this->referenceId)
// {
// $c = KalturaCriteria::create(entryPeer::OM_CLASS);
// $c->add('entry.ID', $sourceObject->getId(), Criteria::NOT_EQUAL);
// $c->add('entry.REFERENCE_ID', $this->referenceId);
// $c->applyFilters();
// if(count($c->getFetchedIds()))
// throw new KalturaAPIException(KalturaErrors::REFERENCE_ID_ALREADY_EXISTS, $this->referenceId);
// }
$this->validateObjectsExist($sourceObject);
return parent::validateForUpdate($sourceObject, $propertiesToSkip);
}
示例3: validateForUpdate
public function validateForUpdate($sourceObject, $propertiesToSkip = array())
{
/* @var $sourceObject accessControl */
$this->validatePropertyMinMaxLength('name', 1, 128, true);
$this->validate();
if ($this->systemName) {
$c = KalturaCriteria::create(accessControlPeer::OM_CLASS);
$c->add(accessControlPeer::ID, $sourceObject->getId(), Criteria::NOT_EQUAL);
$c->add(accessControlPeer::SYSTEM_NAME, $this->systemName);
if (accessControlPeer::doCount($c)) {
throw new KalturaAPIException(KalturaErrors::SYSTEM_NAME_ALREADY_EXISTS, $this->systemName);
}
}
return parent::validateForUpdate($sourceObject, $propertiesToSkip);
}
示例4: validateForUpdate
public function validateForUpdate($sourceObject, $propertiesToSkip = array())
{
if ($this->tags !== null) {
$this->validatePropertyMaxLength("tags", CuePointPeer::MAX_TAGS_LENGTH);
}
if ($this->entryId !== null) {
$this->validateEntryId($sourceObject->getId());
}
if ($this->startTime !== null) {
$this->validateStartTime($sourceObject->getId());
}
$propertiesToSkip[] = 'cuePointType';
return parent::validateForUpdate($sourceObject, $propertiesToSkip);
}
示例5: validateForUpdate
public function validateForUpdate($sourceObject, $propertiesToSkip = array())
{
$this->validatePropertyMinLength('name', 3, true);
$this->validate($sourceObject);
return parent::validateForUpdate($sourceObject, $propertiesToSkip);
}
示例6: validateForUpdateByType
public function validateForUpdateByType($sourceObject, $propertiesToSkip = array(), $type)
{
$this->validateMandatoryAttributes();
$this->validateDuplications($sourceObject->getId(), $type);
return parent::validateForUpdate($sourceObject, $propertiesToSkip);
}
示例7: validateForUpdate
public function validateForUpdate($sourceObject, $propertiesToSkip = array())
{
if ($this->name !== null) {
$this->validatePropertyMinLength("name", 1);
$this->validatePropertyMaxLength("name", categoryPeer::MAX_CATEGORY_NAME);
}
if ($this->parentId !== null) {
$this->validateParentId();
} elseif ($this->inheritanceType == KalturaInheritanceType::INHERIT && ($this->parentId instanceof KalturaNullField || $sourceObject->getParentId() == null)) {
//cannot inherit member with no parant
throw new KalturaAPIException(KalturaErrors::CANNOT_INHERIT_MEMBERS_WHEN_PARENT_CATEGORY_IS_NOT_SET);
}
$this->validateCategory($sourceObject);
return parent::validateForUpdate($sourceObject, $propertiesToSkip);
}
示例8: validateForUpdate
public function validateForUpdate($sourceObject, $propertiesToSkip = array())
{
$propertiesToSkip[] = 'type';
return parent::validateForUpdate($sourceObject, $propertiesToSkip);
}
示例9: validateForUpdate
public function validateForUpdate($sourceObject, $propertiesToSkip = array())
{
$audioThumbEntryId = $this->audioThumbEntryId;
if ($audioThumbEntryId) {
$audioThumbEntry = entryPeer::retrieveByPK($audioThumbEntryId);
if (!$audioThumbEntry || $audioThumbEntry->getMediaType() != entry::ENTRY_MEDIA_TYPE_IMAGE) {
throw new KalturaAPIException(SystemPartnerErrors::PARTNER_AUDIO_THUMB_ENTRY_ID_ERROR, $audioThumbEntryId);
}
}
$liveThumbEntryId = $this->liveThumbEntryId;
if ($liveThumbEntryId) {
$liveThumbEntry = entryPeer::retrieveByPK($liveThumbEntryId);
if (!$liveThumbEntry || $liveThumbEntry->getMediaType() != entry::ENTRY_MEDIA_TYPE_IMAGE) {
throw new KalturaAPIException(SystemPartnerErrors::PARTNER_LIVE_THUMB_ENTRY_ID_ERROR, $liveThumbEntryId);
}
}
return parent::validateForUpdate($sourceObject, $propertiesToSkip);
}
示例10: validateForUpdate
public function validateForUpdate($sourceObject, $propertiesToSkip = array())
{
$this->validatePropertyMinLength("name", 1, true);
if ($this->systemName) {
$c = KalturaCriteria::create(StorageProfilePeer::OM_CLASS);
$c->add(StorageProfilePeer::ID, $sourceObject->getId(), Criteria::NOT_EQUAL);
$c->add(StorageProfilePeer::SYSTEM_NAME, $this->systemName);
if (StorageProfilePeer::doCount($c)) {
throw new KalturaAPIException(KalturaErrors::SYSTEM_NAME_ALREADY_EXISTS, $this->systemName);
}
}
return parent::validateForUpdate($sourceObject, $propertiesToSkip);
}
示例11: validateForUpdate
public function validateForUpdate($sourceObject, $propertiesToSkip = null)
{
/* @var $sourceObject categoryKuser */
$category = categoryPeer::retrieveByPK($sourceObject->getCategoryId());
if (!$category) {
throw new KalturaAPIException(KalturaErrors::CATEGORY_NOT_FOUND, $sourceObject->getCategoryId());
}
if ($this->permissionNames && $this->permissionNames != $sourceObject->getPermissionNames()) {
if ($sourceObject->getKuserId() == $category->getKuserId()) {
if (strpos($this->permissionNames, PermissionName::CATEGORY_EDIT) === false) {
throw new KalturaAPIException(KalturaErrors::CANNOT_UPDATE_CATEGORY_USER_OWNER);
}
}
}
$currentKuserCategoryKuser = categoryKuserPeer::retrievePermittedKuserInCategory($sourceObject->getCategoryId(), kCurrentContext::getCurrentKsKuserId());
if (kEntitlementUtils::getEntitlementEnforcement() && (!$currentKuserCategoryKuser || !$currentKuserCategoryKuser->hasPermission(PermissionName::CATEGORY_EDIT))) {
throw new KalturaAPIException(KalturaErrors::CANNOT_UPDATE_CATEGORY_USER, $sourceObject->getCategoryId());
}
return parent::validateForUpdate($sourceObject, $propertiesToSkip);
}
示例12: validateForUpdate
public function validateForUpdate($sourceObject, $propertiesToSkip = array())
{
$this->validatePropertyMinLength("name", 1, true);
if ($this->systemName) {
$c = KalturaCriteria::create(conversionProfile2Peer::OM_CLASS);
$c->add(conversionProfile2Peer::ID, $sourceObject->getId(), Criteria::NOT_EQUAL);
$c->add(conversionProfile2Peer::SYSTEM_NAME, $this->systemName);
if (conversionProfile2Peer::doCount($c)) {
throw new KalturaAPIException(KalturaErrors::SYSTEM_NAME_ALREADY_EXISTS, $this->systemName);
}
}
if (!is_null($this->flavorParamsIds) && !$this->flavorParamsIds instanceof KalturaNullField) {
$this->validateFlavorParamsIds();
}
$this->validateDefaultEntry();
return parent::validateForUpdate($sourceObject, $propertiesToSkip);
}
示例13: validateForUpdate
public function validateForUpdate($sourceObject = null, $propertiesToSkip = array())
{
$this->validatePropertyNotNull('categoryId');
$this->validatePropertyNotNull('entryId');
parent::validateForUpdate($sourceObject, $propertiesToSkip);
}