| @@ 130-136 (lines=7) @@ | ||
| 127 | 'class' => SmartPerformAction::class, |
|
| 128 | 'scenario' => 'answer', |
|
| 129 | 'success' => Yii::t('hipanel/ticket', 'Subscribed'), |
|
| 130 | 'on beforeSave' => function (Event $event) { |
|
| 131 | /** @var Action $action */ |
|
| 132 | $action = $event->sender; |
|
| 133 | foreach ($action->collection->models as $model) { |
|
| 134 | $model->{$this->_subscribeAction[$action->id]} = Yii::$app->user->identity->username; |
|
| 135 | } |
|
| 136 | }, |
|
| 137 | 'POST pjax' => [ |
|
| 138 | 'save' => true, |
|
| 139 | 'success' => [ |
|
| @@ 150-156 (lines=7) @@ | ||
| 147 | 'class' => SmartPerformAction::class, |
|
| 148 | 'scenario' => 'answer', |
|
| 149 | 'success' => Yii::t('hipanel/ticket', 'Unsubscribed'), |
|
| 150 | 'on beforeSave' => function (Event $event) { |
|
| 151 | /** @var Action $action */ |
|
| 152 | $action = $event->sender; |
|
| 153 | foreach ($action->collection->models as $model) { |
|
| 154 | $model->{$this->_subscribeAction[$action->id]} = Yii::$app->user->identity->username; |
|
| 155 | } |
|
| 156 | }, |
|
| 157 | 'POST pjax' => [ |
|
| 158 | 'save' => true, |
|
| 159 | 'success' => [ |
|