public function activateAction()
    {
        $object = $this->getObject();
        
        if (method_exists($object, 'setActive') && method_exists($object, 'getActive')) {
            $object->setActive(($object->getActive()==1) ? 0 : 1);
        }
        
        $this->admin->update($object);        
        
        return new RedirectResponse($this->admin->generateUrl('list'));
    }
public function activateAction()
    {
        $object = $this->getObject();
        
        if (method_exists($object, 'setActive') && method_exists($object, 'getActive')) {
            $object->setActive(($object->getActive()==1) ? 0 : 1);
        }
        
        $this->admin->update($object);        
        
        return new RedirectResponse($this->admin->generateUrl('list'));
    }
public function activateAction ( ) { $ object = $ this -> getObject ( ) ; if ( method_exists ( $ object , 'setActive' ) && method_exists ( $ object , 'getActive' ) ) { $ object -> setActive ( ( $ object -> getActive ( ) == 1 ) ? 0 : 1 ) ; } $ this -> admin -> update ( $ object ) ; return new RedirectResponse ( $ this -> admin -> generateUrl ( 'list' ) ) ; }
Activate or inactivate the object

@throws Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@return Symfony\Component\HttpFoundation\RedirectResponse
Activate or inactivate the object