1 | <?php |
||
24 | class PNotify extends \yii\base\Widget |
||
25 | { |
||
26 | /** |
||
27 | * @var array options to be passed to PNotify JS call |
||
28 | */ |
||
29 | protected $_clientOptions = [ |
||
30 | 'hide' => true, |
||
31 | 'styling' => 'bootstrap3', |
||
32 | 'buttons' => [ |
||
33 | 'sticker' => false, |
||
34 | ], |
||
35 | ]; |
||
36 | |||
37 | /** |
||
38 | * @var array list of notifications. Will be merged with [[clientOptions]] before notification render |
||
39 | */ |
||
40 | public $notifications = []; |
||
41 | |||
42 | /** |
||
43 | * @param array $value |
||
44 | */ |
||
45 | public function setClientOptions($value) |
||
49 | |||
50 | public function getClientOptions() |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function run() |
||
69 | |||
70 | /** |
||
71 | * Registers JS for PNotify plugin. |
||
72 | * @param array $notification configuration array |
||
73 | */ |
||
74 | protected function registerNotification(array $notification) |
||
81 | |||
82 | /** |
||
83 | * Registers the needed JavaScript. |
||
84 | */ |
||
85 | public function registerClientScript() |
||
90 | } |
||
91 |