Commit a735308c authored by jhodgdon's avatar jhodgdon
Browse files

Issue #2260043 by t0xicCode, amitgoyal: Remove lingering references to...

Issue #2260043 by t0xicCode, amitgoyal: Remove lingering references to obsolete field crud and attach topics and functions
parent 40004729
...@@ -96,8 +96,6 @@ public function resetCache(array $entities = NULL); ...@@ -96,8 +96,6 @@ public function resetCache(array $entities = NULL);
* isolated field. * isolated field.
* - Do not use inside node (or any other entity) templates; use * - Do not use inside node (or any other entity) templates; use
* render($content[FIELD_NAME]) instead. * render($content[FIELD_NAME]) instead.
* - Do not use to display all fields in an entity; use
* field_attach_prepare_view() and field_attach_view() instead.
* - The FieldItemInterface::view() method can be used to output a single * - The FieldItemInterface::view() method can be used to output a single
* formatted field value, without label or wrapping field markup. * formatted field value, without label or wrapping field markup.
* *
......
...@@ -217,7 +217,7 @@ function hook_field_info_max_weight($entity_type, $bundle, $context, $context_mo ...@@ -217,7 +217,7 @@ function hook_field_info_max_weight($entity_type, $bundle, $context, $context_mo
} }
/** /**
* @addtogroup field_crud * @addtogroup field_purge
* @{ * @{
*/ */
...@@ -294,7 +294,7 @@ function hook_field_purge_instance($instance) { ...@@ -294,7 +294,7 @@ function hook_field_purge_instance($instance) {
} }
/** /**
* @} End of "addtogroup field_crud". * @} End of "addtogroup field_purge".
*/ */
/** /**
......
...@@ -52,16 +52,6 @@ ...@@ -52,16 +52,6 @@
* types like Text and Node Reference along with the associated form elements * types like Text and Node Reference along with the associated form elements
* and display formatters. * and display formatters.
* *
* - @link field_crud Field CRUD API @endlink: Create, updates, and deletes
* fields, bundles (a.k.a. "content types"), and instances. Modules use this
* API, often in hook_install(), to create custom data structures.
*
* - @link field_attach Field Attach API @endlink: Connects entity types to the
* Field API. Field Attach API functions load, store, generate Form API
* structures, display, and perform a variety of other functions for field
* data connected to individual entities. Fieldable entity types like node and
* user use this API to make themselves fieldable.
*
* - @link field_purge Field API bulk data deletion @endlink: Cleans up after * - @link field_purge Field API bulk data deletion @endlink: Cleans up after
* bulk deletion operations such as deletion of field or field_instance. * bulk deletion operations such as deletion of field or field_instance.
* *
......
...@@ -198,8 +198,6 @@ class FieldConfig extends ConfigEntityBase implements FieldConfigInterface { ...@@ -198,8 +198,6 @@ class FieldConfig extends ConfigEntityBase implements FieldConfigInterface {
* parameter as in this constructor. * parameter as in this constructor.
* *
* @see entity_create() * @see entity_create()
*
* @ingroup field_crud
*/ */
public function __construct(array $values, $entity_type = 'field_config') { public function __construct(array $values, $entity_type = 'field_config') {
// Check required properties. // Check required properties.
......
...@@ -228,8 +228,6 @@ class FieldInstanceConfig extends ConfigEntityBase implements FieldInstanceConfi ...@@ -228,8 +228,6 @@ class FieldInstanceConfig extends ConfigEntityBase implements FieldInstanceConfi
* property documentation for details. * property documentation for details.
* *
* @see entity_create() * @see entity_create()
*
* @ingroup field_crud
*/ */
public function __construct(array $values, $entity_type = 'field_instance_config') { public function __construct(array $values, $entity_type = 'field_instance_config') {
// Allow either an injected FieldConfig object, or a field_name and // Allow either an injected FieldConfig object, or a field_name and
......
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Language\LanguageInterface;
/** /**
* Unit test class for non-storage related field_attach_* functions. * Unit test class for non-storage related entity field functions.
*
* @todo move this to the Entity module
*/ */
class FieldAttachOtherTest extends FieldUnitTestBase { class FieldAttachOtherTest extends FieldUnitTestBase {
...@@ -31,7 +33,7 @@ class FieldAttachOtherTest extends FieldUnitTestBase { ...@@ -31,7 +33,7 @@ class FieldAttachOtherTest extends FieldUnitTestBase {
public static function getInfo() { public static function getInfo() {
return array( return array(
'name' => 'Field attach tests (other)', 'name' => 'Field attach tests (other)',
'description' => 'Test other Field Attach API functions.', 'description' => 'Test other Field API functions.',
'group' => 'Field API', 'group' => 'Field API',
); );
} }
...@@ -373,7 +375,7 @@ function testEntityFormDisplayExtractFormValues() { ...@@ -373,7 +375,7 @@ function testEntityFormDisplayExtractFormValues() {
} }
$this->assertIdentical($entity->{$this->field_name_2}->getValue(), $expected_values_2, 'Submit filters empty values'); $this->assertIdentical($entity->{$this->field_name_2}->getValue(), $expected_values_2, 'Submit filters empty values');
// Call field_attach_extract_form_values() for a single field (the second field). // Call EntityFormDisplayInterface::extractFormValues() for a single field (the second field).
foreach ($display->getComponents() as $name => $options) { foreach ($display->getComponents() as $name => $options) {
if ($name != $this->field_name_2) { if ($name != $this->field_name_2) {
$display->removeComponent($name); $display->removeComponent($name);
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
/** /**
* Unit test class for storage-related field behavior. * Unit test class for storage-related field behavior.
*
* @todo move this to the Entity module
*/ */
class FieldAttachStorageTest extends FieldUnitTestBase { class FieldAttachStorageTest extends FieldUnitTestBase {
......
...@@ -747,8 +747,7 @@ function hook_node_validate(\Drupal\node\NodeInterface $node, $form, &$form_stat ...@@ -747,8 +747,7 @@ function hook_node_validate(\Drupal\node\NodeInterface $node, $form, &$form_stat
* object, but before the node is saved or previewed. It is a chance for modules * object, but before the node is saved or previewed. It is a chance for modules
* to adjust the node's properties from what they are simply after a copy from * to adjust the node's properties from what they are simply after a copy from
* $form_state['values']. This hook is intended for adjusting non-field-related * $form_state['values']. This hook is intended for adjusting non-field-related
* properties. See hook_field_attach_extract_form_values() for customizing * properties.
* field-related properties.
* *
* @param \Drupal\node\NodeInterface $node * @param \Drupal\node\NodeInterface $node
* The node entity being updated in response to a form submission. * The node entity being updated in response to a form submission.
......
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