PHP Class Sylius\Bundle\CoreBundle\EventListener\ChannelDeletionListener

Author: Gustavo Perdomo ([email protected])
Show file Open project: sylius/sylius

Public Methods

Method Description
__construct ( Sylius\Bundle\ChannelBundle\Doctrine\ORM\ChannelRepository $repository )
onChannelPreDelete ( Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent $event ) Prevent channel deletion if no more channels enabled.

Method Details

__construct() public method

public __construct ( Sylius\Bundle\ChannelBundle\Doctrine\ORM\ChannelRepository $repository )
$repository Sylius\Bundle\ChannelBundle\Doctrine\ORM\ChannelRepository

onChannelPreDelete() public method

Prevent channel deletion if no more channels enabled.
public onChannelPreDelete ( Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent $event )
$event Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent