/**
  * @param string $name
  * @param \Generated\Shared\Transfer\LocaleTransfer $locale
  *
  * @return array
  */
 protected function createDummyRootCategoryWithNode($name, $locale)
 {
     $parentCategory1 = new CategoryTransfer();
     $parentCategory1->setName($name);
     $parentCategory1->setCategoryKey(strtolower($name));
     $idCategory = $this->categoryFacade->createCategory($parentCategory1, $locale);
     $categoryNodeTransfer = new NodeTransfer();
     $categoryNodeTransfer->setFkCategory($idCategory);
     $categoryNodeTransfer->setIsRoot(true);
     $idNode = $this->categoryFacade->createCategoryNode($categoryNodeTransfer, $locale, false);
     return [$idCategory, $idNode];
 }
 /**
  * @param \Generated\Shared\Transfer\CategoryTransfer $categoryTransfer
  * @param \Generated\Shared\Transfer\NodeTransfer $categoryNodeTransfer
  * @param \Generated\Shared\Transfer\LocaleTransfer $localeTransfer
  *
  * @return int
  */
 public function addCategory(CategoryTransfer $categoryTransfer, NodeTransfer $categoryNodeTransfer, LocaleTransfer $localeTransfer)
 {
     $this->connection->beginTransaction();
     $categoryTransfer->setIsActive(true);
     $categoryTransfer->setIsInMenu(true);
     $categoryTransfer->setIsClickable(true);
     $idCategory = $this->categoryFacade->createCategory($categoryTransfer, $localeTransfer);
     $categoryNodeTransfer->setFkCategory($idCategory);
     $categoryNodeTransfer->setIsMain(true);
     $this->categoryFacade->createCategoryNode($categoryNodeTransfer, $localeTransfer);
     $this->connection->commit();
     return $idCategory;
 }