本文整理汇总了PHP中KalturaObject::validateForInsert方法的典型用法代码示例。如果您正苦于以下问题:PHP KalturaObject::validateForInsert方法的具体用法?PHP KalturaObject::validateForInsert怎么用?PHP KalturaObject::validateForInsert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KalturaObject
的用法示例。
在下文中一共展示了KalturaObject::validateForInsert方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validateForInsert
public function validateForInsert($propertiesToSkip = array())
{
parent::validateForInsert($propertiesToSkip);
$this->validatePartnerId();
$this->validatePropertyMinLength("name", 1);
$this->validatePropertyMinLength("query", 1);
}
示例2: validateForInsert
public function validateForInsert($propertiesToSkip = array())
{
$this->validateUsers();
$this->validateCategories();
$this->validatePropertyMinLength('referenceId', 2, true);
$this->validateObjectsExist();
$this->validateParentEntryId();
// if($this->referenceId)
// {
// $c = KalturaCriteria::create(entryPeer::OM_CLASS);
// $c->add('entry.REFERENCE_ID', $this->referenceId);
// $c->applyFilters();
// if(count($c->getFetchedIds()))
// throw new KalturaAPIException(KalturaErrors::REFERENCE_ID_ALREADY_EXISTS, $this->referenceId);
// }
return parent::validateForInsert($propertiesToSkip);
}
示例3: validateForInsert
public function validateForInsert($propertiesToSkip = array())
{
$this->validatePropertyMinMaxLength('name', 1, 128);
$this->validate();
if ($this->systemName) {
$c = KalturaCriteria::create(accessControlPeer::OM_CLASS);
$c->add(accessControlPeer::SYSTEM_NAME, $this->systemName);
if (accessControlPeer::doCount($c)) {
throw new KalturaAPIException(KalturaErrors::SYSTEM_NAME_ALREADY_EXISTS, $this->systemName);
}
}
return parent::validateForInsert($propertiesToSkip);
}
示例4: validateForInsert
public function validateForInsert($propertiesToSkip = array())
{
$this->validatePropertyNotNull("entryId");
$this->validatePropertyNotNull("distributionProfileId");
parent::validateForInsert($propertiesToSkip);
}
示例5: validateForInsert
public function validateForInsert($propertiesToSkip = array())
{
$propertiesToSkip[] = 'cuePointType';
parent::validateForInsert($propertiesToSkip);
$this->validatePropertyNotNull("entryId");
$this->validateEntryId();
$this->validateStartTime();
if ($this->tags != null) {
$this->validatePropertyMaxLength("tags", CuePointPeer::MAX_TAGS_LENGTH);
}
}
示例6: validateForInsert
public function validateForInsert($propertiesToSkip = array())
{
$this->validatePropertyMinLength('name', 3, false);
$this->validate();
return parent::validateForInsert($propertiesToSkip);
}
示例7: validateForInsertByType
public function validateForInsertByType($propertiesToSkip, $type)
{
$this->validateMandatoryAttributes(true);
$this->validateDuplications(null, $type);
return parent::validateForInsert($propertiesToSkip);
}
示例8: validateForInsert
public function validateForInsert($propertiesToSkip = array())
{
$this->validatePropertyMinLength("name", 1);
$this->validatePropertyMaxLength("name", categoryPeer::MAX_CATEGORY_NAME);
$this->validateCategory();
if ($this->parentId !== null) {
$this->validateParentId();
} elseif ($this->inheritanceType == KalturaInheritanceType::INHERIT) {
//cannot inherit member with no parant
throw new KalturaAPIException(KalturaErrors::CANNOT_INHERIT_MEMBERS_WHEN_PARENT_CATEGORY_IS_NOT_SET);
}
return parent::validateForInsert($propertiesToSkip);
}
示例9: validateForInsert
public function validateForInsert($propertiesToSkip = array())
{
$this->validatePropertyNotNull('type');
$propertiesToSkip[] = 'type';
return parent::validateForInsert($propertiesToSkip);
}
示例10: validateForInsert
public function validateForInsert($propertiesToSkip = array())
{
$this->validatePropertyMinLength("name", 1);
if ($this->systemName) {
$c = KalturaCriteria::create(StorageProfilePeer::OM_CLASS);
$c->add(StorageProfilePeer::SYSTEM_NAME, $this->systemName);
if (StorageProfilePeer::doCount($c)) {
throw new KalturaAPIException(KalturaErrors::SYSTEM_NAME_ALREADY_EXISTS, $this->systemName);
}
}
return parent::validateForInsert($propertiesToSkip);
}
示例11: validateForInsert
public function validateForInsert($propertiesToSkip = array())
{
$category = categoryPeer::retrieveByPK($this->categoryId);
if (!$category) {
throw new KalturaAPIException(KalturaErrors::CATEGORY_NOT_FOUND, $this->categoryId);
}
if ($category->getInheritanceType() == InheritanceType::INHERIT) {
throw new KalturaAPIException(KalturaErrors::CATEGORY_INHERIT_MEMBERS, $this->categoryId);
}
$partnerId = kCurrentContext::$partner_id ? kCurrentContext::$partner_id : kCurrentContext::$ks_partner_id;
$kuser = kuserPeer::getKuserByPartnerAndUid($partnerId, $this->userId);
if ($kuser) {
$categoryKuser = categoryKuserPeer::retrieveByCategoryIdAndKuserId($this->categoryId, $kuser->getId());
if ($categoryKuser) {
throw new KalturaAPIException(KalturaErrors::CATEGORY_USER_ALREADY_EXISTS);
}
}
$currentKuserCategoryKuser = categoryKuserPeer::retrievePermittedKuserInCategory($this->categoryId, kCurrentContext::getCurrentKsKuserId());
if ((!$currentKuserCategoryKuser || $currentKuserCategoryKuser->getPermissionLevel() != CategoryKuserPermissionLevel::MANAGER) && $category->getUserJoinPolicy() == UserJoinPolicyType::NOT_ALLOWED && kEntitlementUtils::getEntitlementEnforcement()) {
throw new KalturaAPIException(KalturaErrors::CATEGORY_USER_JOIN_NOT_ALLOWED, $this->categoryId);
}
//if user doesn't exists - create it
if (!$kuser) {
if (!preg_match(kuser::PUSER_ID_REGEXP, $this->userId)) {
throw new KalturaAPIException(KalturaErrors::INVALID_FIELD_VALUE, 'userId');
}
kuserPeer::createKuserForPartner($partnerId, $this->userId);
}
return parent::validateForInsert($propertiesToSkip);
}
示例12: validateForInsert
public function validateForInsert($propertiesToSkip = array())
{
$this->validateMandatoryAttributes(true);
$this->validateDuplications();
return parent::validateForInsert($propertiesToSkip);
}
示例13: validateForInsert
public function validateForInsert($propertiesToSkip = array())
{
$this->validatePropertyMinLength('name', 3, false);
$this->validatePropertyMinLength('systemName', 3, true);
$this->validatePropertyNotNull('objectFilterEngineType');
$this->validatePropertyNotNull('objectFilter');
$this->validatePropertyNotNull('objectTasks');
$this->validatePropertyNotNull('maxTotalCountAllowed');
foreach ($this->objectTasks as $objectTask) {
/* @var KalturaObjectTask $objectTask */
$objectTask->validateForInsert(array('type'));
}
parent::validateForInsert($propertiesToSkip);
}