Get form title and description.

Paramètres

array $element: Form element or child element.

Return value

array An array of form names and the recommended value for that setting.

1 call to advagg_find_title()
advagg_set_admin_form_defaults_recommended dans ./advagg.module
Save form defaults or recommended values.

Fichier

./advagg.module, line 6835

Code

function advagg_find_title(array &$element) {
    $results = array();
    $children = element_children($element);
    foreach ($children as $key) {
        $child = $element[$key];
        if (is_array($child)) {
            if (!empty($child['#type']) && !empty($child['#name']) && isset($child['#title']) && isset($child['#default_value']) && !isset($results[$child['#name']]) && $child['#type'] !== 'radio') {
                $results[$child['#name']] = $child['#title'];
            }
            $results = array_merge($results, advagg_find_title($child));
        }
        unset($child);
    }
    return $results;
}