protected function BulkEditForm::findFormElement in Views Bulk Edit 8
Finds the deepest most form element and returns it.
Parameters
array $form: The form element we're searching.
Return value
array|null The deepest most element if we can find it.
1 call to BulkEditForm::findFormElement()
- BulkEditForm::getSelectorForm in src/
Form/ BulkEditForm.php - Builds the selector form.
File
- src/
Form/ BulkEditForm.php, line 170
Class
- BulkEditForm
- The bulk edit form.
Namespace
Drupal\views_bulk_edit\FormCode
protected function &findFormElement(array &$form) {
foreach (Element::children($form) as $key) {
if (isset($form[$key]['#title']) && isset($form[$key]['#type'])) {
return $form[$key];
}
elseif (is_array($form[$key])) {
$element =& $this
->findFormElement($form[$key]);
return $element;
}
}
}