10 defined(
'JPATH_PLATFORM') or die;
36 public function test(SimpleXMLElement $element, $value, $group = null,
JRegistry $input = null,
JForm $form = null)
39 $fieldActions = self::getFieldActions($element);
40 $valueActions = self::getValueActions($value);
43 foreach ($valueActions as $action)
45 if (!in_array($action, $fieldActions))
63 protected function getValueActions($value)
68 foreach ((array) $value as $name => $rules)
86 protected function getFieldActions(SimpleXMLElement $element)
91 $section = $element[
'section'] ? (string) $element[
'section'] :
'';
92 $component = $element[
'component'] ? (string) $element[
'component'] :
'';
98 foreach ($elActions as $item)
100 $actions[] = $item->name;
104 foreach ($element->children() as $el)
106 if ($el->getName() ==
'action')
108 $actions[] = (string) $el[
'name'];