Comments

naveenvalecha created an issue. See original summary.

naveenvalecha’s picture

sneha_surve’s picture

Assigned: Unassigned » sneha_surve
joachim’s picture

Component: field system » documentation
naveenvalecha’s picture

Status: Active » Needs review
StatusFileSize
new782 bytes

Linked it directly using @link tag. Is there any alternate/better way to link it ?

joachim’s picture

Status: Needs review » Needs work

I don't think that's the best way.

Adding the class name is better: FieldItemInterface::delete(). Though probably needs to be the fully qualified classname, I'm not sure.

naveenvalecha’s picture

I have pinged the Jennifer to points us what's the better way to handle this as I was also not sure whether that was correct.

shashikant_chauhan’s picture

Status: Needs work » Needs review
StatusFileSize
new954 bytes

Adding patch

daffie’s picture

Status: Needs review » Needs work
+++ b/core/modules/field/field.purge.inc
@@ -21,9 +21,9 @@
+ * - Invoking the @link \Drupal\Core\Field\FieldItemListInterface::delete() FieldItemListInterface delete() @endlink
+ *   method for each field on the entity. A file field type might use this
+ *   method to delete uploaded files from the filesystem.

I think we can change this to: "Invoking the method \Drupal\Core\Field\FieldItemListInterface::delete() for each field on the entity. A file field type might use this method to delete uploaded files from the filesystem."

shashikant_chauhan’s picture

Status: Needs work » Needs review
StatusFileSize
new954 bytes
new988 bytes

@daffie, updated the patch as per your suggestion.

joachim’s picture

Status: Needs review » Needs work

Getting there, but it needs to wrap to 80 chars.

Also, we possibly don't need the @link at all, come to think of it. IIRC a fully-qualified method will automatically link.

hardikpandya’s picture

Assigned: sneha_surve » Unassigned
Status: Needs work » Needs review
Issue tags: -Novice
StatusFileSize
new1.63 KB
new1.7 KB

Adding changes as per suggestion #11

daffie’s picture

Status: Needs review » Needs work

Two remarks:

  1. +++ b/core/modules/field/field.purge.inc
    @@ -4,7 +4,6 @@
    -
    
    @@ -106,7 +105,7 @@ function field_purge_batch($batch_size, $field_storage_uuid = NULL) {
    -  $deleted_storages = \Drupal::state()->get('field.storage.deleted') ?: array();
    +  $deleted_storages = \Drupal::state()->get('field.storage.deleted') ? : array();
    

    These changes do not belong in this issue.

  2. +++ b/core/modules/field/field.purge.inc
    @@ -21,9 +20,9 @@
    + *   each field on the entity. A file field type might use this method to delete ¶
    

    This line has an added space at of the line. Please remove it.

hardikpandya’s picture

StatusFileSize
new1.11 KB

Changes done as suggested at #13

hardikpandya’s picture

Status: Needs work » Needs review
daffie’s picture

Status: Needs review » Reviewed & tested by the community

It looks good to me.
For me it is RTBC.

For the committer: Please ignore the first hunk of the patch with the unnecessary removal of a empty line.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 4338fa0 to 8.3.x and 719c20a to 8.2.x. Thanks!

As a docs patch this is rc eligible and therefore can be committed to 8.2.x

+++ b/core/modules/field/field.purge.inc
@@ -4,7 +4,6 @@
-

This is not correct and is totally out-of-scope for this issue. Reverted on commit.

  • alexpott committed 4338fa0 on 8.3.x
    Issue #2798609 by hardik.p, shashikant_chauhan, naveenvalecha, joachim,...

  • alexpott committed 719c20a on 8.2.x
    Issue #2798609 by hardik.p, shashikant_chauhan, naveenvalecha, joachim,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.