31 const NAME =
'admin_monk_revision';
33 function __construct()
35 parent::__construct(self::NAME, array(
36 self::TITLE => _(
"Manage Monk Revision"),
37 self::MENU_LIST =>
"Admin::Agent::Monk",
46 protected function handle(Request $request)
49 $agentDao = $this->
getObject(
'dao.agent');
51 $monk = $agentDao->getCurrentAgentRef(
'monk');
52 $rev = $request->get(
'rev');
53 if ($rev==$monk->getAgentRevision() && $agentDao->renewCurrentAgent(
'monk')) {
54 $text = _(
"You have renewed the monk revision.");
55 return $this->
render(
'include/base.html.twig', $this->mergeWithDefault(array(
'message'=>$text)));
57 $vars[
'content'] =
'<a href="?mod=admin_monk_revision&rev='.$monk->getAgentRevision().
'">'._(
'Renew monk revision').
'</a>';
58 return $this->
render(
'include/base.html.twig', $this->mergeWithDefault($vars));
render($templateName, $vars=null, $headers=null)