@@ 146-152 (lines=7) @@ | ||
143 | 'class' => SmartPerformAction::class, |
|
144 | 'scenario' => 'answer', |
|
145 | 'success' => Yii::t('hipanel:ticket', 'Subscribed'), |
|
146 | 'on beforeSave' => function (Event $event) { |
|
147 | /** @var Action $action */ |
|
148 | $action = $event->sender; |
|
149 | foreach ($action->collection->models as $model) { |
|
150 | $model->{$this->_subscribeAction[$action->id]} = Yii::$app->user->identity->username; |
|
151 | } |
|
152 | }, |
|
153 | 'POST pjax' => [ |
|
154 | 'save' => true, |
|
155 | 'success' => [ |
|
@@ 166-172 (lines=7) @@ | ||
163 | 'class' => SmartPerformAction::class, |
|
164 | 'scenario' => 'answer', |
|
165 | 'success' => Yii::t('hipanel:ticket', 'Unsubscribed'), |
|
166 | 'on beforeSave' => function (Event $event) { |
|
167 | /** @var Action $action */ |
|
168 | $action = $event->sender; |
|
169 | foreach ($action->collection->models as $model) { |
|
170 | $model->{$this->_subscribeAction[$action->id]} = Yii::$app->user->identity->username; |
|
171 | } |
|
172 | }, |
|
173 | 'POST pjax' => [ |
|
174 | 'save' => true, |
|
175 | 'success' => [ |