1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/limesurvey_ynh.git synced 2024-09-03 19:36:32 +02:00
limesurvey_ynh/sources/plugins/Demo/UnActivatable/UnActivatable.php

24 lines
No EOL
707 B
PHP

<?php
/**
* Example plugin that can not be activated.
*/
class UnActivatable extends PluginBase
{
static protected $description = 'Demo: This plugin can not be activated';
static protected $name = 'Unactivatable';
public function __construct(PluginManager $manager, $id) {
parent::__construct($manager, $id);
$this->subscribe('beforeActivate');
}
public function beforeActivate()
{
$event = $this->getEvent();
$event->set('success', false);
// Optionally set a custom error message.
$event->set('message', 'Custom error message from plugin.');
}
}
?>