Newer
Older
<?php
/**
* Art-ER Attrattività, ricerca e territorio dell’Emilia-Romagna
* OPEN 2.0
*
*
* @category CategoryName
* @author Elite Division S.r.l.
*/
use arter\amos\core\module\AmosModule;
use arter\amos\core\module\ModuleInterface;
use arter\amos\sondaggi\widgets\icons\WidgetIconAmministraSondaggi;
use arter\amos\sondaggi\widgets\icons\WidgetIconCompilaSondaggi;
use arter\amos\sondaggi\widgets\icons\WidgetIconPubblicaSondaggi;
use arter\amos\sondaggi\widgets\icons\WidgetIconSondaggi;
use Yii;
use yii\db\Connection;
use yii\helpers\ArrayHelper;
/**
* Class AmosSondaggi
*/
class AmosSondaggi extends AmosModule implements ModuleInterface
{
public static $CONFIG_FOLDER = 'config';
public $controllerNamespace = 'arter\amos\sondaggi\controllers';
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
public $newFileMode = 0666;
public $newDirMode = 0777;
/**
* In the case of a private poll for role, it is possible to send the notification to the users who can fill out the survey.
* @var boolean
*/
public $enableNotificationEmailByRoles = false;
/**
* Default email for the sender
* @var string
*/
public $defaultEmailSender;
/**
* It allows to show in the first page of the results the geoChart based on the province of domicile.
* @var boolean
*/
public $enableGeoChart = false;
/**
* It allows to show in the first page of the results a partecipant report if available.
* @var boolean
*/
public $enablePartecipantsReport = false;
/**
* The fields that will be displayed in the participant's //TO-DO
* @var array
*/
public $fieldsByPartecipants = [];
/**
* @var string|boolean the layout that should be applied for views within this module. This refers to a view name
* relative to [[layoutPath]]. If this is not set, it means the layout value of the [[module|parent module]]
* will be taken. If this is false, layout will be disabled within this module.
*/
public $layout = 'main';
public $name = 'Sondaggi';
/**
* @var Connection|array|string the DB connection object or the application component ID of the DB connection.
*/
public $db = 'db';
/**
* Hide the Option wheel in the graphic widget
* @var bool|false $hideWidgetGraphicsActions
*/
public $hideWidgetGraphicsActions = false;
/**
* @inheritdoc
*/
public function init()
{
parent::init();
$this->db = Yii::$app->db;
\Yii::setAlias('@arter/amos/' . static::getModuleName() . '/controllers/', __DIR__ . '/controllers/');
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// initialize the module with the configuration loaded from config.php
$config = require(__DIR__ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php');
Yii::configure($this, ArrayHelper::merge($config, $this));
}
/**
* @inheritdoc
*/
public static function getModuleName()
{
return "sondaggi";
}
/**
* @inheritdoc
*/
public function getWidgetIcons()
{
return [
WidgetIconSondaggi::className(),
WidgetIconCompilaSondaggi::className(),
WidgetIconPubblicaSondaggi::className(),
WidgetIconAmministraSondaggi::className(),
];
}
/**
* @inheritdoc
*/
public function getWidgetGraphics()
{
return [
];
}
/**
* @inheritdoc
*/
protected function getDefaultModels()
{
return [];
}
}