14 namespace Fossology\DemoHello;
17 use Symfony\Component\HttpFoundation\Request;
29 public function __construct()
31 parent::__construct(self::NAME, array(
32 self::TITLE => _(
"Demo Hello World"),
33 self::MENU_LIST =>
"Help::Demo::Hello World",
48 return _(
"You are not logged in");
52 return $userDao->getUserName($user_pk);
58 protected function handle(Request $request)
60 $UserName = $this->
WhoAmI();
62 $OutBuf =
"<h2>$Hello $UserName </h2>";
63 $OutBuf .= _(
"Wasn't that easy?");
65 return $this->
render(
'include/base.html.twig', $this->mergeWithDefault(array(
'message' => $OutBuf)));
70 register_plugin(
new DemoHello());
UI component for demomod (Visible in menu)
handle(Request $request)
Generate response.
WhoAmI()
Find out who I am from my user record.
Contains the constants and helpers for authentication of user.
static getUserId()
Get the current user's id.
render($templateName, $vars=null, $headers=null)