protected function 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');
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Field!WidgetBase.php/function/WidgetBase::isDefaultValueWidget/8.1.x