protected static function ProcessManager::findButton in Express 8
Traverses an element to find the closest button.
Parameters
\Drupal\bootstrap\Utility\Element $element: The element to iterate over.
Return value
\Drupal\bootstrap\Utility\Element|FALSE The first button element or FALSE if no button could be found.
1 call to ProcessManager::findButton()
- ProcessManager::processInputGroups in themes/
contrib/ bootstrap/ src/ Plugin/ ProcessManager.php - Processes elements that have input groups.
File
- themes/
contrib/ bootstrap/ src/ Plugin/ ProcessManager.php, line 164 - Contains \Drupal\bootstrap\Plugin\ProcessManager.
Class
- ProcessManager
- Manages discovery and instantiation of Bootstrap form process callbacks.
Namespace
Drupal\bootstrap\PluginCode
protected static function &findButton(Element $element) {
$button = FALSE;
foreach ($element
->children() as $child) {
if ($child
->isButton()) {
$button = $child;
}
if ($result =& self::findButton($child)) {
$button = $result;
}
}
return $button;
}