Commit 559115bf authored by jhodgdon's avatar jhodgdon

Issue #2287889 by larowlan: Add information to field topics needed by plugin developers

parent 675f2dd6
......@@ -22,6 +22,8 @@
*
* @see \Drupal\Core\Field\FormatterPluginManager
* @see \Drupal\Core\Field\FormatterInterface
*
* @ingroup field_formatter
*/
class FieldFormatter extends Plugin {
......
......@@ -15,6 +15,8 @@
* Additional annotation keys for field types can be defined in
* hook_field_info_alter().
*
* @ingroup field_types
*
* @Annotation
*/
class FieldType extends DataType {
......
......@@ -21,6 +21,8 @@
*
* @see \Drupal\Core\Field\WidgetPluginManager
* @see \Drupal\Core\Field\WidgetInterface
*
* @ingroup field_widget
*/
class FieldWidget extends Plugin {
......
......@@ -20,6 +20,7 @@
* the static method propertyDefinitions().
*
* @see \Drupal\Core\Field\FieldItemInterface
* @ingroup field_types
*/
abstract class FieldItemBase extends Map implements FieldItemInterface {
......
......@@ -20,6 +20,7 @@
*
* @see \Drupal\Core\Field\FieldItemListInterface
* @see \Drupal\Core\Field\FieldItemBase
* @ingroup field_types
*/
interface FieldItemInterface extends ComplexDataInterface {
......
......@@ -14,6 +14,8 @@
/**
* Plugin manager for 'field type' plugins.
*
* @ingroup field_types
*/
class FieldTypePluginManager extends DefaultPluginManager implements FieldTypePluginManagerInterface {
......
......@@ -11,6 +11,8 @@
/**
* Defines an interface for the field type plugin manager.
*
* @ingroup field_types
*/
interface FieldTypePluginManagerInterface extends PluginManagerInterface {
......
......@@ -9,6 +9,8 @@
/**
* Base class for 'Field formatter' plugin implementations.
*
* @ingroup field_formatter
*/
abstract class FormatterBase extends PluginSettingsBase implements FormatterInterface {
......
......@@ -8,7 +8,9 @@
namespace Drupal\Core\Field;
/**
* Interface definition for field widget plugins.
* Interface definition for field formatter plugins.
*
* @ingroup field_formatter
*/
interface FormatterInterface extends PluginSettingsInterface {
......
......@@ -14,6 +14,8 @@
/**
* Plugin type manager for field formatters.
*
* @ingroup field_formatter
*/
class FormatterPluginManager extends DefaultPluginManager {
......
......@@ -15,6 +15,8 @@
/**
* Base class for 'Field widget' plugin implementations.
*
* @ingroup field_widget
*/
abstract class WidgetBase extends PluginSettingsBase implements WidgetInterface {
......
......@@ -16,6 +16,8 @@
* to override. See Drupal\Core\Field\WidgetBaseInterface for base
* wrapping methods that should most likely be inherited directly from
* Drupal\Core\Field\WidgetBase..
*
* @ingroup field_widget
*/
interface WidgetInterface extends WidgetBaseInterface {
......
......@@ -14,6 +14,8 @@
/**
* Plugin type manager for field widgets.
*
* @ingroup field_widget
*/
class WidgetPluginManager extends DefaultPluginManager {
......
......@@ -18,6 +18,15 @@
* and so on. The data type(s) accepted by a field are defined in
* hook_field_schema().
*
* Field types are plugins annotated with class
* \Drupal\Core\Entity\Annotation\FieldType, and implement plugin interface
* \Drupal\Core\Field\FieldItemInterface. Field Type plugins are managed by the
* \Drupal\Core\Field\FieldTypePluginManager class. Field type classes usually
* extend base class \Drupal\Core\Field\FieldItemBase. Field-type plugins need
* to be in the namespace \Drupal\{your_module}\Plugin\Field\FieldType. See the
* @link plugin_api Plugin API topic @endlink for more information on how to
* define plugins.
*
* The Field Types API also defines two kinds of pluggable handlers: widgets
* and formatters. @link field_widget Widgets @endlink specify how the field
* appears in edit forms, while @link field_formatter formatters @endlink
......@@ -25,6 +34,11 @@
*
* See @link field Field API @endlink for information about the other parts of
* the Field API.
*
* @see field
* @see field_widget
* @see field_formatter
* @see plugin_api
*/
......@@ -57,11 +71,11 @@ function hook_field_info_alter(&$info) {
* which widget to use.
*
* Widgets are Plugins managed by the
* Drupal\Core\Field\WidgetPluginManager class. A widget is
* implemented by providing a class that implements
* Drupal\Core\Field\WidgetInterface (in most cases, by
* subclassing Drupal\Core\Field\WidgetBase), and provides the
* proper annotation block.
* \Drupal\Core\Field\WidgetPluginManager class. A widget is a plugin annotated
* with class \Drupal\Core\Entity\Annotation\FieldWidget that implements
* \Drupal\Core\Field\WidgetInterface (in most cases, by
* subclassing \Drupal\Core\Field\WidgetBase). Widget plugins need to be in the
* namespace \Drupal\{your_module}\Plugin\Field\FieldWidget.
*
* Widgets are @link forms_api_reference.html Form API @endlink
* elements with additional processing capabilities. The methods of the
......@@ -71,6 +85,7 @@ function hook_field_info_alter(&$info) {
* @see field
* @see field_types
* @see field_formatter
* @see plugin_api
*/
/**
......@@ -157,15 +172,16 @@ function hook_field_widget_WIDGET_TYPE_form_alter(&$element, &$form_state, $cont
* choose which formatter to use.
*
* Formatters are Plugins managed by the
* Drupal\Core\Field\FormatterPluginManager class. A formatter
* is implemented by providing a class that implements
* Drupal\Core\Field\FormatterInterface (in most cases, by
* subclassing Drupal\Core\Field\FormatterBase), and provides
* the proper annotation block.
* \Drupal\Core\Field\FormatterPluginManager class. A formatter is a plugin
* annotated with class \Drupal\Core\Entity\Annotation\FieldFormatter that
* implements \Drupal\Core\Field\FormatterInterface (in most cases, by
* subclassing \Drupal\Core\Field\FormatterBase). Formatter plugins need to be
* in the namespace \Drupal\{your_module}\Plugin\Field\FieldFormatter.
*
* @see field
* @see field_types
* @see field_widget
* @see plugin_api
*/
/**
......
......@@ -54,9 +54,6 @@
*
* - @link field_purge Field API bulk data deletion @endlink: Cleans up after
* bulk deletion operations such as deletion of field or field_instance.
*
* - @link field_language Field language API @endlink: Provides native
* multilingual support for the Field API.
*/
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment