src/DlcCategory/Service/Category.php
public function deleteCategory($id)
    {
        $this->validateId($id);

        $category = $this->getMapper()->find($id);

        if (null === $category) {
            throw new \InvalidArgumentException('No category found for id "' . $id . '"');
        }

        $node = $this->getNestedSetManager()->wrapNode($category);
        $node->delete();

        return $this;
    }
public function deleteCategory($id)
    {
        $this->validateId($id);

        $category = $this->getMapper()->find($id);

        if (null === $category) {
            throw new \InvalidArgumentException('No category found for id "' . $id . '"');
        }

        $node = $this->getNestedSetManager()->wrapNode($category);
        $node->delete();

        return $this;
    }
public function deleteCategory ( $ id ) { $ this -> validateId ( $ id ) ; $ category = $ this -> getMapper ( ) -> find ( $ id ) ; if ( null === $ category ) { throw new \ InvalidArgumentException ( 'No category found for id "' . $ id . '"' ) ; } $ node = $ this -> getNestedSetManager ( ) -> wrapNode ( $ category ) ; $ node -> delete ( ) ; return $ this ; }
Deletes a category node

@param int $id
@return \DlcCategory\Service\Category
Deletes a category node