Hello,
I am using lime survey Version 2.64.3+170327 and I am new in plugin development. I go through the manual
Add new menu and view by a plugin
and added the code as given in manual.
//***Plginn Class file
<?php
use \ls\menu\MenuItem;
use \ls\menu\Menu;
class Forum extends PluginBase {
protected $storage = 'DbStorage';
static protected $description = 'Forum';
static protected $name = 'Forum';
public function init()
{
$this->subscribe('beforeAdminMenuRender');
}
public function beforeAdminMenuRender()
{
// Create the URL to the plugin action
$url = $this->api->createUrl(
'admin/pluginhelper',
array(
'sa' => 'fullpagewrapper',
'plugin' => $this->getName(),
'method' => 'actionIndex' // Method name in our plugin
)
);
// Append menu
$event = $this->getEvent();
$event->append('extraMenus', array(
new Menu(array(
'label' => 'Forum label',
'href' => $url
))
));
}
/**
* @return string html
*/
public function actionIndex()
{
return "This is the content of the side-body";
}
}
//****/view/index.php file
<div class='container-fluid'>
<h3 class='pagetitle'>A page</h3>
<div class='row'>
<div class='col-sm-6'>
<p>Left column</p>
</div>
<div class='col-sm-6'>
<p>Right column</p>
</div>
</div>
</div>
Menu added in admin menu
Landing page view
I tried to search in admincontroller.php page but not get any hint.
Please help me in the plugin view creation.
Thanks & Regard
Siddhant Wankar