Issue #2260043 by t0xicCode, amitgoyal: Remove lingering references to obsolete field crud and attach topics and functions
							parent
							
								
									40004729f2
								
							
						
					
					
						commit
						a735308ce5
					
				| 
						 | 
				
			
			@ -96,8 +96,6 @@ interface EntityViewBuilderInterface {
 | 
			
		|||
   * isolated field.
 | 
			
		||||
   * - Do not use inside node (or any other entity) templates; use
 | 
			
		||||
   *   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
 | 
			
		||||
   *   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
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @addtogroup field_crud
 | 
			
		||||
 * @addtogroup field_purge
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -294,7 +294,7 @@ function hook_field_purge_instance($instance) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @} End of "addtogroup field_crud".
 | 
			
		||||
 * @} End of "addtogroup field_purge".
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,16 +52,6 @@ require_once __DIR__ . '/field.purge.inc';
 | 
			
		|||
 *   types like Text and Node Reference along with the associated form elements
 | 
			
		||||
 *   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
 | 
			
		||||
 *   bulk deletion operations such as deletion of field or field_instance.
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -198,8 +198,6 @@ class FieldConfig extends ConfigEntityBase implements FieldConfigInterface {
 | 
			
		|||
   * parameter as in this constructor.
 | 
			
		||||
   *
 | 
			
		||||
   * @see entity_create()
 | 
			
		||||
   *
 | 
			
		||||
   * @ingroup field_crud
 | 
			
		||||
   */
 | 
			
		||||
  public function __construct(array $values, $entity_type = 'field_config') {
 | 
			
		||||
    // Check required properties.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -228,8 +228,6 @@ class FieldInstanceConfig extends ConfigEntityBase implements FieldInstanceConfi
 | 
			
		|||
   *   property documentation for details.
 | 
			
		||||
   *
 | 
			
		||||
   * @see entity_create()
 | 
			
		||||
   *
 | 
			
		||||
   * @ingroup field_crud
 | 
			
		||||
   */
 | 
			
		||||
  public function __construct(array $values, $entity_type = 'field_instance_config') {
 | 
			
		||||
    // Allow either an injected FieldConfig object, or a field_name and
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,9 @@ namespace Drupal\field\Tests;
 | 
			
		|||
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 {
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -31,7 +33,7 @@ class FieldAttachOtherTest extends FieldUnitTestBase {
 | 
			
		|||
  public static function getInfo() {
 | 
			
		||||
    return array(
 | 
			
		||||
      'name' => 'Field attach tests (other)',
 | 
			
		||||
      'description' => 'Test other Field Attach API functions.',
 | 
			
		||||
      'description' => 'Test other Field API functions.',
 | 
			
		||||
      'group' => 'Field API',
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			@ -373,7 +375,7 @@ class FieldAttachOtherTest extends FieldUnitTestBase {
 | 
			
		|||
    }
 | 
			
		||||
    $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) {
 | 
			
		||||
      if ($name != $this->field_name_2) {
 | 
			
		||||
        $display->removeComponent($name);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,6 +10,8 @@ use Drupal\field\Entity\FieldInstanceConfig;
 | 
			
		|||
 | 
			
		||||
/**
 | 
			
		||||
 * Unit test class for storage-related field behavior.
 | 
			
		||||
 *
 | 
			
		||||
 * @todo move this to the Entity module
 | 
			
		||||
 */
 | 
			
		||||
class FieldAttachStorageTest extends FieldUnitTestBase {
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 * 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
 | 
			
		||||
 * properties. See hook_field_attach_extract_form_values() for customizing
 | 
			
		||||
 * field-related properties.
 | 
			
		||||
 * properties.
 | 
			
		||||
 *
 | 
			
		||||
 * @param \Drupal\node\NodeInterface $node
 | 
			
		||||
 *   The node entity being updated in response to a form submission.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue