public static function Element::create in Express 8
Creates a new \Drupal\bootstrap\Utility\Element instance.
Parameters
array|string $element: A render array element or a string.
\Drupal\Core\Form\FormStateInterface $form_state: A current FormState instance, if any.
Return value
\Drupal\bootstrap\Utility\Element The newly created element instance.
21 calls to Element::create()
- ActionsDropbutton::processElement in themes/
contrib/ bootstrap/ src/ Plugin/ Process/ ActionsDropbutton.php - Process a specific form element.
- BootstrapDropdown::preprocessLinks in themes/
contrib/ bootstrap/ src/ Plugin/ Preprocess/ BootstrapDropdown.php - Preprocess links in the variables array to convert them from dropbuttons.
- BootstrapDropdown::preprocessVariables in themes/
contrib/ bootstrap/ src/ Plugin/ Preprocess/ BootstrapDropdown.php - Preprocess the variables array.
- Element::createStandalone in themes/
contrib/ bootstrap/ src/ Utility/ Element.php - Creates a new standalone \Drupal\bootstrap\Utility\Element instance.
- FormBase::alterForm in themes/
contrib/ bootstrap/ src/ Plugin/ Form/ FormBase.php - The alter method to store the code.
File
- themes/
contrib/ bootstrap/ src/ Utility/ Element.php, line 269 - Contains \Drupal\bootstrap\Utility\Element.
Class
- Element
- Provides helper methods for Drupal render elements.
Namespace
Drupal\bootstrap\UtilityCode
public static function create(&$element = [], FormStateInterface $form_state = NULL) {
return $element instanceof self ? $element : new self($element, $form_state);
}