Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443915
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443915
Commits
130ccc56
Commit
130ccc56
authored
13 years ago
by
Jennifer Hodgdon
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1391118
by sven.lauer: Clean up Field API topics docs
parent
d5685e89
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/modules/field/field.api.php
+63
-34
63 additions, 34 deletions
core/modules/field/field.api.php
core/modules/field_ui/field_ui.api.php
+2
-2
2 additions, 2 deletions
core/modules/field_ui/field_ui.api.php
with
65 additions
and
36 deletions
core/modules/field/field.api.php
+
63
−
34
View file @
130ccc56
<?php
<?php
/**
/**
* @
in
group hooks
* @
addto
group hooks
* @{
* @{
*/
*/
...
@@ -83,35 +83,19 @@ function hook_field_extra_fields_alter(&$info) {
...
@@ -83,35 +83,19 @@ function hook_field_extra_fields_alter(&$info) {
/**
/**
* @defgroup field_types Field Types API
* @defgroup field_types Field Types API
* @{
* @{
* Define field
types, widget types, display formatter types, storage
types.
* Define field types.
*
*
* The bulk of the Field Types API are related to field types. A field type
* In the Field API, each field has a type, which determines what kind of data
* represents a particular type of data (integer, string, date, etc.) that
* (integer, string, date, etc.) the field can hold, which settings it provides,
* can be attached to a fieldable entity. hook_field_info() defines the basic
* and so on. The data type(s) accepted by a field are defined in
* properties of a field type, and a variety of other field hooks are called by
* hook_field_schema(); other basic properties of a field are defined in
* the Field Attach API to perform field-type-specific actions.
* hook_field_info(). The other hooks below are called by the Field Attach API
*
* to perform field-type-specific actions.
* @see hook_field_info()
* @see hook_field_info_alter()
* @see hook_field_schema()
* @see hook_field_load()
* @see hook_field_validate()
* @see hook_field_presave()
* @see hook_field_insert()
* @see hook_field_update()
* @see hook_field_delete()
* @see hook_field_delete_revision()
* @see hook_field_prepare_view()
* @see hook_field_is_empty()
*
*
* The Field Types API also defines two kinds of pluggable handlers: widgets
* The Field Types API also defines two kinds of pluggable handlers: widgets
* and formatters, which specify how the field appears in edit forms and in
* and formatters. @link field_widget Widgets @endlink specify how the field
* displayed entities. Widgets and formatters can be implemented by a field-type
* appears in edit forms, while @link field_formatter formatters @endlink
* module for its own field types, or by a third-party module to extend the
* specify how the field appears in displayed entities.
* behavior of existing field types.
*
* @see hook_field_widget_info()
* @see hook_field_formatter_info()
*
*
* A third kind of pluggable handlers, storage backends, is defined by the
* A third kind of pluggable handlers, storage backends, is defined by the
* @link field_storage Field Storage API @endlink.
* @link field_storage Field Storage API @endlink.
...
@@ -668,11 +652,33 @@ function hook_field_is_empty($item, $field) {
...
@@ -668,11 +652,33 @@ function hook_field_is_empty($item, $field) {
}
}
/**
/**
* Expose Field API widget types.
* @} End of "defgroup field_types"
*/
/**
* @defgroup field_widget Field Widget API
* @{
* Define Field API widget types.
*
* Field API widgets specify how fields are displayed in edit forms. Fields of a
* given @link field_types field type @endlink may be edited using more than one
* widget. In this case, the Field UI module allows the site builder to choose
* which widget to use. Widget types are defined by implementing
* hook_field_widget_info().
*
*
* Widgets are Form API elements with additional processing capabilities.
* Widgets are
* Widget hooks are typically called by the Field Attach API during the
* @link http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html Form API @endlink
* creation of the field form structure with field_attach_form().
* elements with additional processing capabilities. Widget hooks are typically
* called by the Field Attach API during the creation of the field form
* structure with field_attach_form().
*
* @see field
* @see field_types
* @see field_formatter
*/
/**
* Expose Field API widget types.
*
*
* @return
* @return
* An array describing the widget types implemented by the module.
* An array describing the widget types implemented by the module.
...
@@ -928,6 +934,29 @@ function hook_field_widget_error($element, $error, $form, &$form_state) {
...
@@ -928,6 +934,29 @@ function hook_field_widget_error($element, $error, $form, &$form_state) {
form_error
(
$element
[
'value'
],
$error
[
'message'
]);
form_error
(
$element
[
'value'
],
$error
[
'message'
]);
}
}
/**
* @} End of "defgroup field_widget"
*/
/**
* @defgroup field_formatter Field Formatter API
* @{
* Define Field API formatter types.
*
* Field API formatters specify how fields are displayed when the entity to
* which the field is attached is displayed. Fields of a given
* @link field_types field type @endlink may be displayed using more than one
* formatter. In this case, the Field UI module allows the site builder to
* choose which formatter to use. Field formatters are defined by implementing
* hook_field_formatter_info().
*
* @see field
* @see field_types
* @see field_widget
*/
/**
/**
* Expose Field API formatter types.
* Expose Field API formatter types.
*
*
...
@@ -1146,7 +1175,7 @@ function hook_field_formatter_view($entity_type, $entity, $field, $instance, $la
...
@@ -1146,7 +1175,7 @@ function hook_field_formatter_view($entity_type, $entity, $field, $instance, $la
}
}
/**
/**
* @} End of "
in
group field_
type
"
* @} End of "
def
group field_
formatter
"
*/
*/
/**
/**
...
@@ -1502,7 +1531,7 @@ function hook_field_attach_delete_bundle($entity_type, $bundle, $instances) {
...
@@ -1502,7 +1531,7 @@ function hook_field_attach_delete_bundle($entity_type, $bundle, $instances) {
}
}
/**
/**
* @} End of "
in
group field_attach"
* @} End of "
def
group field_attach"
*/
*/
/**
/**
...
@@ -2623,5 +2652,5 @@ function hook_field_access($op, $field, $entity_type, $entity, $account) {
...
@@ -2623,5 +2652,5 @@ function hook_field_access($op, $field, $entity_type, $entity, $account) {
}
}
/**
/**
* @} End of "
in
group hooks"
* @} End of "
addto
group hooks"
*/
*/
This diff is collapsed.
Click to expand it.
core/modules/field_ui/field_ui.api.php
+
2
−
2
View file @
130ccc56
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*/
*/
/**
/**
* @
in
group
field_ui_
field_type
* @
addto
group field_type
s
* @{
* @{
*/
*/
...
@@ -200,5 +200,5 @@ function hook_field_formatter_settings_summary($field, $instance, $view_mode) {
...
@@ -200,5 +200,5 @@ function hook_field_formatter_settings_summary($field, $instance, $view_mode) {
}
}
/**
/**
* @} End of "
in
group
field_ui_
field_type"
* @} End of "
addto
group field_type
s
"
*/
*/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment