class TestFieldWidgetMultilingual

Same name in other branches
  1. 9 core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldWidget/TestFieldWidgetMultilingual.php \Drupal\field_test\Plugin\Field\FieldWidget\TestFieldWidgetMultilingual
  2. 8.9.x core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldWidget/TestFieldWidgetMultilingual.php \Drupal\field_test\Plugin\Field\FieldWidget\TestFieldWidgetMultilingual
  3. 11.x core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldWidget/TestFieldWidgetMultilingual.php \Drupal\field_test\Plugin\Field\FieldWidget\TestFieldWidgetMultilingual

Plugin implementation of the 'test_field_widget_multilingual' widget.

Hierarchy

Expanded class hierarchy of TestFieldWidgetMultilingual

File

core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldWidget/TestFieldWidgetMultilingual.php, line 13

Namespace

Drupal\field_test\Plugin\Field\FieldWidget
View source
class TestFieldWidgetMultilingual extends TestFieldWidget {
    
    /**
     * {@inheritdoc}
     */
    public function form(FieldItemListInterface $items, array &$form, FormStateInterface $form_state, $get_delta = NULL) {
        $elements = parent::form($items, $form, $form_state, $get_delta);
        $elements['#multilingual'] = TRUE;
        return $elements;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 6
PluginInspectionInterface::getPluginId public function Gets the plugin ID of the plugin instance. 2
PluginSettingsBase::$defaultSettingsMerged protected property Whether default settings have been merged into the current $settings.
PluginSettingsBase::$thirdPartySettings protected property The plugin settings injected by third party modules.
PluginSettingsBase::getSetting public function Overrides PluginSettingsInterface::getSetting
PluginSettingsBase::getSettings public function Overrides PluginSettingsInterface::getSettings
PluginSettingsBase::getThirdPartyProviders public function Overrides ThirdPartySettingsInterface::getThirdPartyProviders
PluginSettingsBase::getThirdPartySetting public function Overrides ThirdPartySettingsInterface::getThirdPartySetting
PluginSettingsBase::getThirdPartySettings public function Overrides ThirdPartySettingsInterface::getThirdPartySettings
PluginSettingsBase::mergeDefaults protected function Merges default settings values into $settings.
PluginSettingsBase::setSetting public function Overrides PluginSettingsInterface::setSetting
PluginSettingsBase::setSettings public function Overrides PluginSettingsInterface::setSettings
PluginSettingsBase::setThirdPartySetting public function Overrides ThirdPartySettingsInterface::setThirdPartySetting
PluginSettingsBase::unsetThirdPartySetting public function Overrides ThirdPartySettingsInterface::unsetThirdPartySetting
TestFieldWidget::calculateDependencies public function Calculates dependencies for the configured plugin. Overrides PluginSettingsBase::calculateDependencies
TestFieldWidget::defaultSettings public static function Defines the default settings for this plugin. Overrides PluginSettingsBase::defaultSettings
TestFieldWidget::errorElement public function Assigns a field-level validation error to the right widget sub-element. Overrides WidgetBase::errorElement
TestFieldWidget::formElement public function Returns the form for a single field widget. Overrides WidgetInterface::formElement
TestFieldWidget::onDependencyRemoval public function Informs the plugin that some configuration it depends on will be deleted. Overrides PluginSettingsBase::onDependencyRemoval
TestFieldWidget::settingsForm public function Returns a form to configure settings for the widget. Overrides WidgetBase::settingsForm
TestFieldWidget::settingsSummary public function Returns a short summary for the current widget settings. Overrides WidgetBase::settingsSummary
TestFieldWidgetMultilingual::form public function Creates a form element for a field. Overrides WidgetBase::form
WidgetBase::$fieldDefinition protected property The field definition.
WidgetBase::$settings protected property The widget settings. Overrides PluginSettingsBase::$settings
WidgetBase::addMoreAjax public static function Ajax callback for the "Add another item" button.
WidgetBase::addMoreSubmit public static function Submission handler for the "Add another item" button.
WidgetBase::afterBuild public static function After-build handler for field elements in a form.
WidgetBase::create public static function Overrides ContainerFactoryPluginInterface::create 5
WidgetBase::deleteAjax public static function Ajax refresh callback for the "Remove" button.
WidgetBase::deleteSubmit public static function Ajax submit callback for the "Remove" button.
WidgetBase::extractFormValues public function Overrides WidgetBaseInterface::extractFormValues 3
WidgetBase::flagErrors public function Overrides WidgetBaseInterface::flagErrors 2
WidgetBase::formMultipleElements protected function Special handling to create form elements for multiple values. 1
WidgetBase::formSingleElement protected function Generates the form element for a single copy of the widget.
WidgetBase::getFieldSetting protected function Returns the value of a field setting.
WidgetBase::getFieldSettings protected function Returns the array of field settings.
WidgetBase::getFilteredDescription protected function Returns the filtered field description.
WidgetBase::getWidgetState public static function Overrides WidgetBaseInterface::getWidgetState
WidgetBase::getWidgetStateParents protected static function Returns the location of processing information within $form_state.
WidgetBase::handlesMultipleValues protected function Returns whether the widget handles multiple values.
WidgetBase::isApplicable public static function Overrides WidgetInterface::isApplicable 4
WidgetBase::isDefaultValueWidget protected function Returns whether the widget used for default value form.
WidgetBase::massageFormValues public function Overrides WidgetInterface::massageFormValues 7
WidgetBase::setWidgetState public static function Overrides WidgetBaseInterface::setWidgetState
WidgetBase::__construct public function Constructs a WidgetBase object. 5

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.