public setIsActive ( boolean $is_active ) : self | ||
$is_active | boolean | the is active |
Résultat | self |
public function setIsActive($is_active)
{
$this->is_active = $is_active;
return $this;
}
/** * Remove (soft) existing editorial comment * @param EditorialComment $comment * @param User $user */ public function remove(EditorialComment $comment, User $user) { if ($comment->getUser()->getId() == $user->getId() || $user->isAdmin()) { $comment->setIsActive(false); } else { throw new AccessDeniedHttpException("User is not allowed to remove comment"); } $this->em->flush(); return true; }