Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
4fc16f8e
Commit
4fc16f8e
authored
Jul 20, 2013
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2035315
by dawehner: Add a dedicated @FieldWidget annotation.
parent
5d649f8b
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
154 additions
and
74 deletions
+154
-74
core/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDatelistWidget.php
...l/datetime/Plugin/field/widget/DatetimeDatelistWidget.php
+2
-3
core/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDefaultWidget.php
...al/datetime/Plugin/field/widget/DatetimeDefaultWidget.php
+2
-3
core/modules/email/lib/Drupal/email/Plugin/field/widget/EmailDefaultWidget.php
...b/Drupal/email/Plugin/field/widget/EmailDefaultWidget.php
+2
-3
core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/widget/AutocompleteTagsWidget.php
..._reference/Plugin/field/widget/AutocompleteTagsWidget.php
+2
-3
core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/widget/AutocompleteWidget.php
...tity_reference/Plugin/field/widget/AutocompleteWidget.php
+2
-3
core/modules/field/lib/Drupal/field/Annotation/FieldWidget.php
...modules/field/lib/Drupal/field/Annotation/FieldWidget.php
+91
-0
core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php
...b/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php
+20
-11
core/modules/field/lib/Drupal/field/Plugin/field/widget/HiddenWidget.php
...eld/lib/Drupal/field/Plugin/field/widget/HiddenWidget.php
+2
-3
core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidget.php
...Drupal/field_test/Plugin/field/widget/TestFieldWidget.php
+2
-3
core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidgetMultiple.php
...ield_test/Plugin/field/widget/TestFieldWidgetMultiple.php
+3
-3
core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidgetNoDefault.php
...eld_test/Plugin/field/widget/TestFieldWidgetNoDefault.php
+2
-3
core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php
...s/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php
+2
-3
core/modules/image/lib/Drupal/image/Plugin/field/widget/ImageWidget.php
...mage/lib/Drupal/image/Plugin/field/widget/ImageWidget.php
+2
-3
core/modules/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php
...s/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php
+2
-3
core/modules/number/lib/Drupal/number/Plugin/field/widget/NumberWidget.php
...er/lib/Drupal/number/Plugin/field/widget/NumberWidget.php
+2
-3
core/modules/options/lib/Drupal/options/Plugin/field/widget/ButtonsWidget.php
.../lib/Drupal/options/Plugin/field/widget/ButtonsWidget.php
+2
-3
core/modules/options/lib/Drupal/options/Plugin/field/widget/OnOffWidget.php
...ns/lib/Drupal/options/Plugin/field/widget/OnOffWidget.php
+2
-3
core/modules/options/lib/Drupal/options/Plugin/field/widget/SelectWidget.php
...s/lib/Drupal/options/Plugin/field/widget/SelectWidget.php
+2
-3
core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/widget/TaxonomyAutocompleteWidget.php
...xonomy/Plugin/field/widget/TaxonomyAutocompleteWidget.php
+2
-3
core/modules/telephone/lib/Drupal/telephone/Plugin/field/widget/TelephoneDefaultWidget.php
.../telephone/Plugin/field/widget/TelephoneDefaultWidget.php
+2
-3
core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWidget.php
...xt/lib/Drupal/text/Plugin/field/widget/TextareaWidget.php
+2
-3
core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWithSummaryWidget.php
...al/text/Plugin/field/widget/TextareaWithSummaryWidget.php
+2
-3
core/modules/text/lib/Drupal/text/Plugin/field/widget/TextfieldWidget.php
...t/lib/Drupal/text/Plugin/field/widget/TextfieldWidget.php
+2
-3
No files found.
core/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDatelistWidget.php
View file @
4fc16f8e
...
...
@@ -6,7 +6,7 @@
namespace
Drupal\datetime\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
...
...
@@ -20,9 +20,8 @@
/**
* Plugin implementation of the 'datetime_datelist' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "datetime_datelist",
* module = "datetime",
* label = @Translation("Select list"),
* field_types = {
* "datetime"
...
...
core/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDefaultWidget.php
View file @
4fc16f8e
...
...
@@ -6,7 +6,7 @@
namespace
Drupal\datetime\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
...
...
@@ -19,9 +19,8 @@
/**
* Plugin implementation of the 'datetime_default' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "datetime_default",
* module = "datetime",
* label = @Translation("Date and time"),
* field_types = {
* "datetime"
...
...
core/modules/email/lib/Drupal/email/Plugin/field/widget/EmailDefaultWidget.php
View file @
4fc16f8e
...
...
@@ -7,16 +7,15 @@
namespace
Drupal\email\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
/**
* Plugin implementation of the 'email_default' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "email_default",
* module = "email",
* label = @Translation("E-mail"),
* field_types = {
* "email"
...
...
core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/widget/AutocompleteTagsWidget.php
View file @
4fc16f8e
...
...
@@ -7,16 +7,15 @@
namespace
Drupal\entity_reference\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\entity_reference
\
Plugin\field\widget\AutocompleteWidgetBase
;
/**
* Plugin implementation of the 'entity_reference autocomplete-tags' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "entity_reference_autocomplete_tags",
* module = "entity_reference",
* label = @Translation("Autocomplete (Tags style)"),
* description = @Translation("An autocomplete text field."),
* field_types = {
...
...
core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/widget/AutocompleteWidget.php
View file @
4fc16f8e
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\entity_reference\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\entity_reference
\
Plugin\field\widget\AutocompleteWidgetBase
;
...
...
@@ -19,9 +19,8 @@
* the two widgets, and the Field API doesn't update default settings when
* the widget changes.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "entity_reference_autocomplete",
* module = "entity_reference",
* label = @Translation("Autocomplete"),
* description = @Translation("An autocomplete text field."),
* field_types = {
...
...
core/modules/field/lib/Drupal/field/Annotation/FieldWidget.php
0 → 100644
View file @
4fc16f8e
<?php
/**
* @file
* Contains \Drupal\field\Annotation\FieldWidget.
*/
namespace
Drupal\field\Annotation
;
use
Drupal\Component\Annotation\Plugin
;
/**
* Defines a FieldWidget annotation object.
*
* Widgets handle how fields are displayed in edit forms.
*
* Additional annotation keys for formatters can be defined in
* hook_field_widget_info_alter().
*
* @Annotation
*
* @see \Drupal\field\Plugin\Type\Widget\WidgetPluginManager
* @see \Drupal\field\Plugin\Type\Widget\WidgetInterface
*/
class
FieldWidget
extends
Plugin
{
/**
* The plugin ID.
*
* @var string
*/
public
$id
;
/**
* The human-readable name of the widget type.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*/
public
$label
;
/**
* A short description of the widget type.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*/
public
$description
;
/**
* The name of the widget class.
*
* This is not provided manually, it will be added by the discovery mechanism.
*
* @var string
*/
public
$class
;
/**
* An array of field types the widget supports.
*
* @var array
*/
public
$field_types
=
array
();
/**
* An array whose keys are the names of the settings available to the widget
* type, and whose values are the default values for those settings.
*
* @var array
*/
public
$settings
=
array
();
/**
* Does the field widget handles multiple values at once.
*
* @var bool
*/
public
$multiple_values
=
FALSE
;
/**
* An integer to determine the weight of this widget relative to other widgets
* in the Field UI when selecting a widget for a given field instance.
*
* @var int optional
*/
public
$weight
=
NULL
;
}
core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php
View file @
4fc16f8e
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\field\Plugin\Type\Widget
;
use
Drupal\Component\Plugin\Factory\DefaultFactory
;
use
Drupal\Component\Plugin\PluginManagerBase
;
use
Drupal\Component\Plugin\Discovery\ProcessDecorator
;
use
Drupal\Core\Cache\CacheBackendInterface
;
...
...
@@ -29,16 +30,6 @@ class WidgetPluginManager extends DefaultPluginManager {
*/
protected
$widgetOptions
;
/**
* Overrides Drupal\Component\Plugin\PluginManagerBase:$defaults.
*/
protected
$defaults
=
array
(
'field_types'
=>
array
(),
'settings'
=>
array
(),
'multiple_values'
=>
FALSE
,
'default_value'
=>
TRUE
,
);
/**
* Constructs a WidgetPluginManager object.
*
...
...
@@ -53,7 +44,9 @@ class WidgetPluginManager extends DefaultPluginManager {
* The language manager.
*/
public
function
__construct
(
\
Traversable
$namespaces
,
CacheBackendInterface
$cache_backend
,
ModuleHandlerInterface
$module_handler
,
LanguageManager
$language_manager
)
{
parent
::
__construct
(
'field/widget'
,
$namespaces
);
$annotation_namespaces
=
array
(
'Drupal\field\Annotation'
=>
$namespaces
[
'Drupal\field'
]);
parent
::
__construct
(
'field/widget'
,
$namespaces
,
$annotation_namespaces
,
'Drupal\field\Annotation\FieldWidget'
);
$this
->
setCacheBackend
(
$cache_backend
,
$language_manager
,
'field_widget_types'
);
$this
->
alterInfo
(
$module_handler
,
'field_widget_info'
);
...
...
@@ -110,6 +103,22 @@ public function getInstance(array $options) {
return
$this
->
createInstance
(
$plugin_id
,
$configuration
);
}
/**
* {@inheritdoc}
*/
public
function
createInstance
(
$plugin_id
,
array
$configuration
=
array
())
{
$plugin_definition
=
$this
->
discovery
->
getDefinition
(
$plugin_id
);
$plugin_class
=
DefaultFactory
::
getPluginClass
(
$plugin_id
,
$plugin_definition
);
// If the plugin provides a factory method, pass the container to it.
if
(
is_subclass_of
(
$plugin_class
,
'Drupal\Core\Plugin\ContainerFactoryPluginInterface'
))
{
return
$plugin_class
::
create
(
\
Drupal
::
getContainer
(),
$configuration
,
$plugin_id
,
$plugin_definition
);
}
return
new
$plugin_class
(
$plugin_id
,
$plugin_definition
,
$configuration
[
'field_definition'
],
$configuration
[
'settings'
]);
}
/**
* Merges default values for widget configuration.
*
...
...
core/modules/field/lib/Drupal/field/Plugin/field/widget/HiddenWidget.php
View file @
4fc16f8e
...
...
@@ -7,16 +7,15 @@
namespace
Drupal\field\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
/**
* Plugin implementation of the 'Hidden' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "hidden",
* module = "field",
* label = @Translation("- Hidden -"),
* multiple_values = TRUE,
* weight = 50
...
...
core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidget.php
View file @
4fc16f8e
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\field_test\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
use
Symfony\Component\Validator\ConstraintViolationInterface
;
...
...
@@ -15,9 +15,8 @@
/**
* Plugin implementation of the 'test_field_widget' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "test_field_widget",
* module = "field_test",
* label = @Translation("Test widget"),
* field_types = {
* "test_field",
...
...
core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidgetMultiple.php
View file @
4fc16f8e
...
...
@@ -7,7 +7,8 @@
namespace
Drupal\field_test\Plugin\field\widget
;
use
Drupal\Component\Annotation\Plugin
;
use
Drupal\field\Annotation\FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
use
Symfony\Component\Validator\ConstraintViolationInterface
;
...
...
@@ -19,9 +20,8 @@
*
* @see field_test_field_widget_info_alter()
*
* @
Plugin
(
* @
FieldWidget
(
* id = "test_field_widget_multiple",
* module = "field_test",
* label = @Translation("Test widget - multiple"),
* settings = {
* "test_widget_setting_multiple" = "dummy test string"
...
...
core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidgetNoDefault.php
View file @
4fc16f8e
...
...
@@ -7,16 +7,15 @@
namespace
Drupal\field_test\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
/**
* Plugin implementation of the 'test_field_widget_no_default' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "test_field_widget_no_default",
* module = "field_test",
* label = @Translation("Test widget - no default"),
* field_types = {
* "test_field"
...
...
core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php
View file @
4fc16f8e
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\file\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
use
Drupal\Core\Entity\EntityInterface
;
...
...
@@ -15,9 +15,8 @@
/**
* Plugin implementation of the 'file_generic' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "file_generic",
* module = "file",
* label = @Translation("File"),
* field_types = {
* "file"
...
...
core/modules/image/lib/Drupal/image/Plugin/field/widget/ImageWidget.php
View file @
4fc16f8e
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\image\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
use
Drupal\file\Plugin\field\widget\FileWidget
;
...
...
@@ -16,9 +16,8 @@
/**
* Plugin implementation of the 'image_image' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "image_image",
* module = "image",
* label = @Translation("Image"),
* field_types = {
* "image"
...
...
core/modules/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php
View file @
4fc16f8e
...
...
@@ -7,16 +7,15 @@
namespace
Drupal\link\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
/**
* Plugin implementation of the 'link' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "link_default",
* module = "link",
* label = @Translation("Link"),
* field_types = {
* "link"
...
...
core/modules/number/lib/Drupal/number/Plugin/field/widget/NumberWidget.php
View file @
4fc16f8e
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\number\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
use
Symfony\Component\Validator\ConstraintViolationInterface
;
...
...
@@ -15,9 +15,8 @@
/**
* Plugin implementation of the 'number' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "number",
* module = "number",
* label = @Translation("Text field"),
* field_types = {
* "number_integer",
...
...
core/modules/options/lib/Drupal/options/Plugin/field/widget/ButtonsWidget.php
View file @
4fc16f8e
...
...
@@ -7,15 +7,14 @@
namespace
Drupal\options\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
/**
* Plugin implementation of the 'options_buttons' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "options_buttons",
* module = "options",
* label = @Translation("Check boxes/radio buttons"),
* field_types = {
* "list_integer",
...
...
core/modules/options/lib/Drupal/options/Plugin/field/widget/OnOffWidget.php
View file @
4fc16f8e
...
...
@@ -7,15 +7,14 @@
namespace
Drupal\options\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
/**
* Plugin implementation of the 'options_onoff' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "options_onoff",
* module = "options",
* label = @Translation("Single on/off checkbox"),
* field_types = {
* "list_boolean"
...
...
core/modules/options/lib/Drupal/options/Plugin/field/widget/SelectWidget.php
View file @
4fc16f8e
...
...
@@ -7,15 +7,14 @@
namespace
Drupal\options\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
/**
* Plugin implementation of the 'options_select' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "options_select",
* module = "options",
* label = @Translation("Select list"),
* field_types = {
* "list_integer",
...
...
core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/widget/TaxonomyAutocompleteWidget.php
View file @
4fc16f8e
...
...
@@ -7,16 +7,15 @@
namespace
Drupal\taxonomy\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
/**
* Plugin implementation of the 'taxonomy_autocomplete' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "taxonomy_autocomplete",
* module = "taxonomy",
* label = @Translation("Autocomplete term widget (tagging)"),
* field_types = {
* "taxonomy_term_reference"
...
...
core/modules/telephone/lib/Drupal/telephone/Plugin/field/widget/TelephoneDefaultWidget.php
View file @
4fc16f8e
...
...
@@ -7,16 +7,15 @@
namespace
Drupal\telephone\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
/**
* Plugin implementation of the 'telephone_default' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "telephone_default",
* module = "telephone",
* label = @Translation("Telephone number"),
* field_types = {
* "telephone"
...
...
core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWidget.php
View file @
4fc16f8e
...
...
@@ -7,16 +7,15 @@
namespace
Drupal\text\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
/**
* Plugin implementation of the 'text_textarea' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "text_textarea",
* module = "text",
* label = @Translation("Text area (multiple rows)"),
* field_types = {
* "text_long"
...
...
core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWithSummaryWidget.php
View file @
4fc16f8e
...
...
@@ -7,16 +7,15 @@
namespace
Drupal\text\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Symfony\Component\Validator\ConstraintViolationInterface
;
/**
* Plugin implementation of the 'text_textarea_with_summary' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "text_textarea_with_summary",
* module = "text",
* label = @Translation("Text area with a summary"),
* field_types = {
* "text_with_summary"
...
...
core/modules/text/lib/Drupal/text/Plugin/field/widget/TextfieldWidget.php
View file @
4fc16f8e
...
...
@@ -7,16 +7,15 @@
namespace
Drupal\text\Plugin\field\widget
;
use
Drupal\
Component
\Annotation\
Plugin
;
use
Drupal\
field
\Annotation\
FieldWidget
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\field\Plugin\Type\Widget\WidgetBase
;
/**
* Plugin implementation of the 'text_textfield' widget.
*
* @
Plugin
(
* @
FieldWidget
(
* id = "text_textfield",
* module = "text",
* label = @Translation("Text field"),
* field_types = {
* "text"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment