BeforeSurveyBarRender: Difference between revisions
From LimeSurvey Manual
Created page with "{{FeatureStarting|2.51.0}} '''When''' This event is fired before the survey bar is rendered. '''Input''' The event receives the following information: {| ! Name !! Type..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{ | {{Alert|This feature is not yet released.}} | ||
'''When''' | '''When''' |
Latest revision as of 10:45, 26 September 2016
When
This event is fired before the survey bar is rendered.
Input
The event receives the following information:
Name | Type | Description |
---|---|---|
surveyId | integer | The id of the current survey |
Possible output
The following information can be set in the event:
Name | Type | Description |
---|---|---|
menus | Menu[] | Array of Menu objects |
Example
public function beforeSurveyBarRender()
{
$event = $this->getEvent();
$surveyId = $event->get('surveyId');
$menu = new Menu(array(
'label' => $this->gT('MyPlugin'),
'iconClass' => 'fa fa-some-icon',
'href' => $href
));
$event->append('menus', array($menu));
}