Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. WidgetBase.php

function WidgetBase::isDefaultValueWidget

Returns whether the widget used for default value form.

Parameters

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

bool TRUE if a widget used to input default value, FALSE otherwise.

6 calls to WidgetBase::isDefaultValueWidget()
CommentWidget::formElement in core/modules/comment/src/Plugin/Field/FieldWidget/CommentWidget.php
Returns the form for a single field widget.
LinkWidget::formElement in core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php
Returns the form for a single field widget.
TextareaWidget::formElement in core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php
Returns the form for a single field widget.
TextfieldWidget::formElement in core/modules/text/src/Plugin/Field/FieldWidget/TextfieldWidget.php
Returns the form for a single field widget.
WidgetBase::form in core/lib/Drupal/Core/Field/WidgetBase.php
Creates a form element for a field.

... See full list

File

core/lib/Drupal/Core/Field/WidgetBase.php, line 706

Class

WidgetBase
Base class for 'Field widget' plugin implementations.

Namespace

Drupal\Core\Field

Code

protected function isDefaultValueWidget(FormStateInterface $form_state) {
    return (bool) $form_state->get('default_value_widget');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal