Skip to content

Commit

Permalink
Fixed issue #8364: Error in Plugin Example
Browse files Browse the repository at this point in the history
  • Loading branch information
SamMousa committed Nov 21, 2013
1 parent 88e2d28 commit a8ae579
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions plugins/Demo/Example/Example.php
Expand Up @@ -44,8 +44,9 @@ public function __construct(PluginManager $manager, $id) {
* Below are the actual methods that handle events
*/

public function afterAdminMenuLoaded(PluginEvent $event)
public function afterAdminMenuLoaded()
{
$event = $this->event;
$menu = $event->get('menu', array());
$menu['left'][]=array(
'href' => "http://docs.limesurvey.org",
Expand All @@ -56,8 +57,9 @@ public function afterAdminMenuLoaded(PluginEvent $event)
$event->set('menu', $menu);
}

public function helloWorld(PluginEvent $event)
public function helloWorld()
{
$event = $this->event;
$count = (int) $this->get('count');
if ($count === false) $count = 0;
$count++;
Expand All @@ -72,8 +74,9 @@ public function helloWorld(PluginEvent $event)
* The plugin should return setting meta data.
* @param PluginEvent $event
*/
public function beforeSurveySettings(PluginEvent $event)
public function beforeSurveySettings()
{
$event = $this->event;
$event->set("surveysettings.{$this->id}", array(
'name' => get_class($this),
'settings' => array(
Expand All @@ -86,8 +89,9 @@ public function beforeSurveySettings(PluginEvent $event)
));
}

public function newSurveySettings(PluginEvent $event)
public function newSurveySettings()
{
$event = $this->event;
foreach ($event->get('settings') as $name => $value)
{

Expand Down

0 comments on commit a8ae579

Please sign in to comment.