app['translator']); } } $filename = $data['filename']; $text = $this->app->trans('The document %name% has been quarantined', ['%name%' => $filename]); if ( ! ! count($reasons)) { $text .= ' ' . $this->app->trans('for the following reasons : %reasons%', ['%reasons%' => implode(', ', $reasons)]); } $ret = ['text' => $text, 'class' => '']; return $ret; } /** * * @return string */ public function get_name() { return $this->app->trans('Quarantine notificaton'); } /** * * @return string */ public function get_description() { return $this->app->trans('be notified when a document is placed in quarantine'); } /** * @param integer $usr_id The id of the user to check * * @return boolean */ public function is_available(User $user) { return $this->app['acl']->get($user)->has_right('addrecord'); } }