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