PHP Class PartKeepr\CategoryBundle\EventListener\RootCategoryListener

Inheritance: extends Symfony\Component\DependencyInjection\ContainerAware
ファイルを表示 Open project: partkeepr/PartKeepr

Public Methods

Method Description
__construct ( Symfony\Component\DependencyInjection\Container $container, $service )
onFlush ( Doctrine\ORM\Event\OnFlushEventArgs $eventArgs ) Checks that only one root category exists.

Protected Methods

Method Description
checkForRoot ( AbstractCategory $category )
ensureRootstays ( AbstractCategory $category )

Method Details

__construct() public method

public __construct ( Symfony\Component\DependencyInjection\Container $container, $service )
$container Symfony\Component\DependencyInjection\Container

checkForRoot() protected method

protected checkForRoot ( AbstractCategory $category )
$category PartKeepr\CategoryBundle\Entity\AbstractCategory

ensureRootstays() protected method

protected ensureRootstays ( AbstractCategory $category )
$category PartKeepr\CategoryBundle\Entity\AbstractCategory

onFlush() public method

Checks that only one root category exists.
public onFlush ( Doctrine\ORM\Event\OnFlushEventArgs $eventArgs )
$eventArgs Doctrine\ORM\Event\OnFlushEventArgs The event arguments as given by Doctrine