app['repo.users']->find($usr_id)) { return []; } $sender = $user->getDisplayName(); $ret = [ 'text' => $this->app->trans('%user% a passe une %opening_link% commande %end_link%', [ '%user%' => $sender, '%opening_link%' => '', '%end_link%' => '',]) , 'class' => '' ]; return $ret; } /** * * @return string */ public function get_name() { return $this->app->trans('Nouvelle commande'); } /** * * @return string */ public function get_description() { return $this->app->trans('Recevoir des notifications lorsqu\'un utilisateur commande des documents'); } /** * @param integer $usr_id The id of the user to check * * @return boolean */ public function is_available(User $user) { return $this->app->getAclForUser($user)->has_right(\ACL::ORDER_MASTER); } }