Networking\InitCmsBundle\Model\ModelChangedListener::preRemove PHP Method

preRemove() public method

public preRemove ( Doctrine\Common\EventArgs $args )
$args Doctrine\Common\EventArgs
    public function preRemove(EventArgs $args)
    {
        $this->getLoggingInfo($args, 'removed');
    }

Usage Example

 /**
  * @param EventArgs $args
  */
 public function preRemove(EventArgs $args)
 {
     parent::preRemove($args);
     if (method_exists($args->getEntity(), 'isDeletable')) {
         if ($args->getEntity()->isDeletable() == 0) {
             //find a solution... like throwing super Exception thingy
         }
     }
 }