Hello i am trying to set the settings array, i need to set one setting per language, it returns a 500 error.
any idea to launch mysql querys in contructor or something similar?
thanks
public function __construct(PluginManager $manager, $id)
{
parent::__construct($manager, $id);
# Here you should handle subscribing to the events your plugin will handle
$this->subscribe('newDirectRequest');
$this->subscribe('afterSurveyComplete');
$this->setSettings();
}
/**
* PRIVATE :: Obtener idiomas a partir de las preguntas
* USED BY :: setSettings()
*
* @return array
*/
private function getLangs() {
$sql = 'select distinct language from {{questions}}';
$result = \dbExecuteAssoc($sql);
return $result->readAll();
}