| @@ 121-127 (lines=7) @@ | ||
| 118 | 'class' => SmartPerformAction::class, |
|
| 119 | 'scenario' => 'answer', |
|
| 120 | 'success' => Yii::t('hipanel:ticket', 'Subscribed'), |
|
| 121 | 'on beforeSave' => function (Event $event) { |
|
| 122 | /** @var Action $action */ |
|
| 123 | $action = $event->sender; |
|
| 124 | foreach ($action->collection->models as $model) { |
|
| 125 | $model->{$this->_subscribeAction[$action->id]} = Yii::$app->user->identity->username; |
|
| 126 | } |
|
| 127 | }, |
|
| 128 | 'POST pjax' => [ |
|
| 129 | 'save' => true, |
|
| 130 | 'success' => [ |
|
| @@ 141-147 (lines=7) @@ | ||
| 138 | 'class' => SmartPerformAction::class, |
|
| 139 | 'scenario' => 'answer', |
|
| 140 | 'success' => Yii::t('hipanel:ticket', 'Unsubscribed'), |
|
| 141 | 'on beforeSave' => function (Event $event) { |
|
| 142 | /** @var Action $action */ |
|
| 143 | $action = $event->sender; |
|
| 144 | foreach ($action->collection->models as $model) { |
|
| 145 | $model->{$this->_subscribeAction[$action->id]} = Yii::$app->user->identity->username; |
|
| 146 | } |
|
| 147 | }, |
|
| 148 | 'POST pjax' => [ |
|
| 149 | 'save' => true, |
|
| 150 | 'success' => [ |
|