protected function validateFullNameIsUnique() { $fullName = $this->getFullName(); $fullName = categoryPeer::getParsedFullName($fullName); $partnerId = null; if ($this->getPartnerId() != kCurrentContext::$ks_partner_id) { $partnerId = $this->getPartnerId(); } KalturaCriterion::disableTag(KalturaCriterion::TAG_ENTITLEMENT_CATEGORY); $category = categoryPeer::getByFullNameExactMatch($fullName, $this->getId(), $partnerId); KalturaCriterion::restoreTag(KalturaCriterion::TAG_ENTITLEMENT_CATEGORY); if ($category) { throw new kCoreException("Duplicate category: {$fullName}", kCoreException::DUPLICATE_CATEGORY); } }