You are here

public function RulesFormsElementWrapper::getElementInfo in Rules Forms Support 7.2

Returns element info as defined in element property info.

Parameters

string $name: An optional name of a key to return.

Return value

mixed An array of element info, or a specific property if $name is defined.

File

includes/rules_forms.wrapper.inc, line 119
Manages and Process Form structure.

Class

RulesFormsElementWrapper
Wrapper class for form element arrays.

Code

public function getElementInfo($name = NULL) {
  $info = $this
    ->info();
  if (isset($info['element info'])) {
    if (isset($name)) {
      return isset($info['element info'][$name]) ? $info['element info'][$name] : NULL;
    }
    return $info['element info'];
  }
  return array();
}