Hi Denis.
I'm sorry, but I could not with Yii.
Edited a plugin Demo (ShowResponse) and it worked.
It was so for those who wish ...
Code:
class GetId extends PluginBase {
//protected $storage = 'DbStorage';
static protected $description = 'Get id survey';
static protected $name = 'GetId';
public function __construct(PluginManager $manager, $id)
{
parent::__construct($manager, $id);
/**
* Here you should handle subscribing to the events your plugin will handle
*/
$this->subscribe('afterSurveyComplete', 'getmyId');
}
/*
* Below are the actual methods that handle events
*/
public function getmyId()
{
$event = $this->getEvent();
$surveyId = $event->get('surveyId');
$responseId = $event->get('responseId');
if (!isset($_SESSION)) session_start();
$_SESSION['myId'] = $responseId;
}
}
Should create my own, but I'm not good at it.
I just want to see it working.
Thanks!