public function BreadcrumbTitle::alterFormElement in Express 8
The alter method to store the code.
Parameters
\Drupal\bootstrap\Utility\Element $form: The Element object that comprises the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
string $form_id: String representing the name of the form itself. Typically this is the name of the function that generated the form.
Overrides SettingBase::alterFormElement
File
- themes/
contrib/ bootstrap/ src/ Plugin/ Setting/ Components/ Breadcrumbs/ BreadcrumbTitle.php, line 37 - Contains \Drupal\bootstrap\Plugin\Setting\Components\Breadcrumbs\BreadcrumbTitle.
Class
- BreadcrumbTitle
- The "breadcrumb_title" theme setting.
Namespace
Drupal\bootstrap\Plugin\Setting\Components\BreadcrumbsCode
public function alterFormElement(Element $form, FormStateInterface $form_state, $form_id = NULL) {
$setting = $this
->getSettingElement($form, $form_state);
$setting
->setProperty('states', [
'invisible' => [
':input[name="breadcrumb"]' => [
'value' => 0,
],
],
]);
}