Adds the cp option category to the database. Also notifies the appropriate model listeners.

@param cpOptionCategory the cp option category
@return the cp option category that was added
485901
public static com.liferay.commerce.product.model.CPOptionCategory addCPOptionCategory(
		com.liferay.commerce.product.model.CPOptionCategory cpOptionCategory) {
		return getService().addCPOptionCategory(cpOptionCategory);
	}
786909
public static com.liferay.commerce.product.model.CPOptionValue addCPOptionValue(
		long cpOptionId, java.util.Map<java.util.Locale, String> titleMap,
		double priority, String key,
		com.liferay.portal.kernel.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService()
				   .addCPOptionValue(cpOptionId, titleMap, priority, key,
			serviceContext);
	}
61151
@Override
  public final void setPriceCategory(final PriceCategory pPriceCategory) {
    this.priceCategory = pPriceCategory;
    if (this.itsId == null) {
      this.itsId = new SeServicePriceId();
    }
    this.itsId.setPriceCategory(this.priceCategory);
  }
1110416
@Override
	public List<CPSpecificationOption> findByCPOptionCategoryId(
		long CPOptionCategoryId) {
		return findByCPOptionCategoryId(CPOptionCategoryId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
842411
@Override
	public List<CPOptionCategory> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
199890
public function AddCategory() {
      // Check permission
      $this->Permission('Garden.Settings.Manage');
      
      // Set up head
      $this->AddJsFile('jquery.alphanumeric.js');
      $this->AddJsFile('categories.js');
      $this->AddJsFile('jquery.gardencheckboxgrid.js');
      $this->Title(T('Add Category'));
      $this->AddSideMenu('vanilla/settings/managecategories');
      
      // Prep models
      $RoleModel = new RoleModel();
      $PermissionModel = Gdn::PermissionModel();
      $this->Form->SetModel($this->CategoryModel);
      
      // Load all roles with editable permissions.
      $this->RoleArray = $RoleModel->GetArray();
      
      $this->FireEvent('AddEditCategory');
      
      if ($this->Form->IsPostBack() == FALSE) {
         $this->Form->AddHidden('CodeIsDefined', '0');
      } else {
         // Form was validly submitted
         $IsParent = $this->Form->GetFormValue('IsParent', '0');
         $this->Form->SetFormValue('AllowDiscussions', $IsParent == '1' ? '0' : '1');
         $this->Form->SetFormValue('CustomPoints', (bool)$this->Form->GetFormValue('CustomPoints'));
         $CategoryID = $this->Form->Save();
         if ($CategoryID) {
            $Category = CategoryModel::Categories($CategoryID);
            $this->SetData('Category', $Category);
            
            if ($this->DeliveryType() == DELIVERY_TYPE_ALL)
               Redirect('vanilla/settings/managecategories');
         } else {
            unset($CategoryID);
         }
      }
      // Get all of the currently selected role/permission combinations for this junction.
      $Permissions = $PermissionModel->GetJunctionPermissions(array('JunctionID' => isset($CategoryID) ? $CategoryID : 0), 'Category');
      $Permissions = $PermissionModel->UnpivotPermissions($Permissions, TRUE);
   
      if ($this->DeliveryType() == DELIVERY_TYPE_ALL) {
         $this->SetData('PermissionData', $Permissions, TRUE);
      }
      
      // Render default view
      $this->Render();      
   }
439868
@Override
	@Transactional(enabled = false)
	public CPOptionCategory createCPOptionCategory(long CPOptionCategoryId) {
		return cpOptionCategoryPersistence.create(CPOptionCategoryId);
	}
1057831
@Override
	public void removeByC_COC(long CPDefinitionId, long CPOptionCategoryId) {
		for (CPDefinitionSpecificationOptionValue cpDefinitionSpecificationOptionValue : findByC_COC(
				CPDefinitionId, CPOptionCategoryId, QueryUtil.ALL_POS,
				QueryUtil.ALL_POS, null)) {
			remove(cpDefinitionSpecificationOptionValue);
		}
	}
856026
@Override
	public CPOptionCategory removeByG_K(long groupId, String key)
		throws NoSuchCPOptionCategoryException {
		CPOptionCategory cpOptionCategory = findByG_K(groupId, key);

		return remove(cpOptionCategory);
	}
1176076
public static com.liferay.commerce.model.CPDAvailabilityEstimate addCPDAvailabilityEstimate(
		com.liferay.commerce.model.CPDAvailabilityEstimate cpdAvailabilityEstimate) {
		return getService().addCPDAvailabilityEstimate(cpdAvailabilityEstimate);
	}
859991
public function addCategory(\HarvestCloud\CoreBundle\Entity\Category $child)
    {
        $this->children[] = $child;

        $child->setParent($this);
    }
226828
@Override
	public com.liferay.commerce.product.model.CPDefinitionOptionRel updateCPDefinitionOptionRel(
		com.liferay.commerce.product.model.CPDefinitionOptionRel cpDefinitionOptionRel) {
		return _cpDefinitionOptionRelLocalService.updateCPDefinitionOptionRel(cpDefinitionOptionRel);
	}
973689
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPSpecificationOption updateCPSpecificationOption(
		CPSpecificationOption cpSpecificationOption) {
		return cpSpecificationOptionPersistence.update(cpSpecificationOption);
	}
997060
@Override
	public java.util.List<com.liferay.commerce.product.model.CPOptionCategory> getCPOptionCategoriesByUuidAndCompanyId(
		String uuid, long companyId) {
		return _cpOptionCategoryLocalService.getCPOptionCategoriesByUuidAndCompanyId(uuid,
			companyId);
	}
1296835
public static com.liferay.commerce.product.model.CPTaxCategory createCPTaxCategory(
		long CPTaxCategoryId) {
		return getService().createCPTaxCategory(CPTaxCategoryId);
	}
314824
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPTaxCategory updateCPTaxCategory(CPTaxCategory cpTaxCategory) {
		return cpTaxCategoryPersistence.update(cpTaxCategory);
	}
403052
public static com.liferay.commerce.product.model.CPOptionCategory createCPOptionCategory(
		long CPOptionCategoryId) {
		return getService().createCPOptionCategory(CPOptionCategoryId);
	}