/**
  * @param CreateCategoryRequest $request
  */
 public function execute(CreateCategoryRequest $request)
 {
     $category = $this->categoryFactory->create($request->getName());
     $this->categoryRepository->add($category);
     $this->treeManager->assignParent($category, $request->getParent());
     $this->categoryCreated();
 }
 /**
  * @param MoveCategoryRequest $request
  */
 public function execute(MoveCategoryRequest $request)
 {
     $child = $request->getChild();
     $parent = $request->getNewParent();
     $this->treeManager->assignParent($child, $parent);
 }