WidgetBase::isDefaultValueWidget

protected WidgetBase::isDefaultValueWidget(FormStateInterface $form_state)

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.

File

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

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');
}
doc_Drupal
2016-10-29 09:56:42
Comments
Leave a Comment

Please login to continue.