| @@ -1,10 +1,15 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | trait UserAutomationActions |
| 4 | 4 | { |
| 5 | - public function onAcymDeclareActions(array &$actions): void | |
| 5 | + protected function initAutomationActions(): void | |
| 6 | 6 | { |
| 7 | + $this->automationActions['acy_group_action'] = acym_translation('ACYM_ACTION_ON_GROUPS'); | |
| 8 | + } | |
| 9 | + | |
| 10 | + public function displayActionOptions_acy_group_action(): void | |
| 11 | + { | |
| 7 | 12 | $allGroups = acym_getGroups(); |
| 8 | 13 | $groups = ['none' => acym_translation('ACYM_SELECT_GROUP')]; |
| 9 | 14 | foreach ($allGroups as $group) { |
| 10 | 15 | $groups[$group->id] = $group->text; |
| @@ -10,18 +15,9 @@ | ||
| 10 | 15 | $groups[$group->id] = $group->text; |
| 11 | 16 | } |
| 12 | 17 | unset($groups[ACYM_ADMIN_GROUP]); |
| 13 | 18 | |
| 14 | - $actions['acy_group_action'] = new stdClass(); | |
| 15 | - $actions['acy_group_action']->name = acym_translation('ACYM_ACTION_ON_GROUPS'); | |
| 16 | - ob_start(); | |
| 17 | 19 | include acym_getPartial('actions', 'acy_group_action'); |
| 18 | - $actions['acy_group_action']->option = ob_get_clean(); | |
| 19 | - } | |
| 20 | - | |
| 21 | - public function onAcymDeclareActionsScenario(array &$actions): void | |
| 22 | - { | |
| 23 | - $this->onAcymDeclareActions($actions); | |
| 24 | 20 | } |
| 25 | 21 | |
| 26 | 22 | public function onAcymProcessAction_acy_group_action(&$query, $action) |
| 27 | 23 | { |