|
13 | 13 | */
|
14 | 14 | class ActionGroupObject
|
15 | 15 | {
|
16 |
| - const VAR_ATTRIBUTES = ['userInput', 'selector', 'page', 'url']; |
| 16 | + /** |
| 17 | + * Array of variable-enabled attributes. |
| 18 | + * @var array |
| 19 | + */ |
| 20 | + private $varAttributes; |
17 | 21 |
|
18 | 22 | /**
|
19 | 23 | * The name of the action group
|
@@ -45,6 +49,11 @@ class ActionGroupObject
|
45 | 49 | */
|
46 | 50 | public function __construct($name, $arguments, $actions)
|
47 | 51 | {
|
| 52 | + $this->varAttributes = array_merge( |
| 53 | + ActionObject::SELECTOR_ENABLED_ATTRIBUTES, |
| 54 | + ActionObject::DATA_ENABLED_ATTRIBUTES |
| 55 | + ); |
| 56 | + $this->varAttributes[] = ActionObject::ACTION_ATTRIBUTE_URL; |
48 | 57 | $this->name = $name;
|
49 | 58 | $this->arguments = $arguments;
|
50 | 59 | $this->parsedActions = $actions;
|
@@ -87,7 +96,7 @@ private function getResolvedActionsWithArgs($arguments, $actionReferenceKey)
|
87 | 96 | $regexPattern = '/{{([\w.\[\]]+)\(*([\w.$\']+)*\)*}}/';
|
88 | 97 |
|
89 | 98 | foreach ($this->parsedActions as $action) {
|
90 |
| - $varAttributes = array_intersect(self::VAR_ATTRIBUTES, array_keys($action->getCustomActionAttributes())); |
| 99 | + $varAttributes = array_intersect($this->varAttributes, array_keys($action->getCustomActionAttributes())); |
91 | 100 | $newActionAttributes = [];
|
92 | 101 | if (!empty($varAttributes)) {
|
93 | 102 | // 1 check to see if we have pertinent var
|
|
0 commit comments