API page: https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityRefe...

None of the methods in this interface document their parameters!

Issue fork drupal-2850057

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim created an issue. See original summary.

Pavan B S’s picture

Assigned: Unassigned » Pavan B S
Status: Active » Needs review
FileSize
1.31 KB

Updating the patch Please check

joachim’s picture

Status: Needs review » Needs work

Thanks for the patch. It's a good start, but it doesn't follow our documentation standards:

+++ b/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionInterface.php
@@ -16,27 +16,27 @@
-   * @return array
+   * @param $match, $match_operator, $limit

For instance, each parameter needs its own @param with its own description.

shashikant_chauhan’s picture

we are working on this in code sprint.

ritzz’s picture

Assigned: Pavan B S » ritzz
Status: Needs work » Needs review
FileSize
1.46 KB
Munavijayalakshmi’s picture

Need white space between @parm and @return, I am attaching patch for the issue, Please Review.

Aanal.addweb’s picture

Status: Needs review » Reviewed & tested by the community

@ritzz Thanks for the patch & @Munavijayalakshmi, Thanks for the merged patch! it works well.

xjm’s picture

Status: Reviewed & tested by the community » Needs work

Thanks, this is a good start to add the missing documentation. I think we need to do a little more work to come up with documentation that communicates what is needed.

  1. +++ b/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionInterface.php
    @@ -17,6 +17,13 @@
    +   * @param $match
    

    The parameters should follow the format:
    @param (datatype) $parameter

  2. +++ b/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionInterface.php
    @@ -17,6 +17,13 @@
    +   *    String that needs to be matched.
    ...
    +   *    Match operator that needs to be applied on String.
    ...
    +   *    Limit which is set to 0 as default.
    
    @@ -27,6 +34,11 @@ public function getReferenceableEntities($match = NULL, $match_operator = 'CONTA
    +   *    String that needs to be matched.
    ...
    +   *    Match operator that needs to be applied on String.
    

    Optional parameters should start with (optional)

    This documentation also does not explain to me yet what the correct usage of these parameters is. Let's take a closer look at both what the method does and what code that calls it does, and try to come up with some more complete documentation.

  3. +++ b/core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionInterface.php
    @@ -35,6 +47,9 @@ public function countReferenceableEntities($match = NULL, $match_operator = 'CON
    +   *   An array of id's passed to validate.
    

    Small correction: This should say "Ids" rather than "id's". Also, we can probably remove the word "passed".

Let's work on an updated package for those things. Be sure to look at the code in the implementations of this interface and their callers to get a good idea about what the documentation should say.

Munavijayalakshmi’s picture

Assigned: Munavijayalakshmi » Unassigned
Status: Needs work » Needs review
FileSize
1.53 KB
1.54 KB

#8 Fixed, Applying patch.

Munavijayalakshmi’s picture

Ignore the previous patch i forgot to give solution for the condition 1 in the #8 comment. Applying the patch for all the 3 conditions please review.

Aanal.addweb’s picture

Status: Needs review » Reviewed & tested by the community

@Munavijayalakshmi, Thanks! for the updated patch,it works well.

amateescu’s picture

Status: Reviewed & tested by the community » Needs work

#8.1 and #8.2 are still not addressed properly. Not all the parameters have the data type specified and the help text still doesn't describe their intended usage..

gaurav.kapoor’s picture

Status: Needs work » Needs review
FileSize
1.56 KB
953 bytes
Aanal.addweb’s picture

Status: Needs review » Reviewed & tested by the community

@gaurav.kapoor, Thanks for the updated patch i checked your patch manually by applying it in module file & it works well after the process.

xjm’s picture

Status: Reviewed & tested by the community » Needs work

#8.2 is still not addressed:

This documentation also does not explain to me yet what the correct usage of these parameters is. Let's take a closer look at both what the method does and what code that calls it does, and try to come up with some more complete documentation.

Thanks!

@dhwani.addweb, the automated testing infrastructure tells us whether the patch applies, so we do not need people to review that. Manual testing is not useful for API documentation patches.

What we do need people to review is whether the issue has a correct scope, whether it passes the core gates, whether the solution completely fixes the problem without introducing other problems, and whether it's the best solution we can come up with. See the patch review guide for more information.

gaurav.kapoor’s picture

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

tanubansal’s picture

@params are added ... Tested via #16
This can be moved to RTBC

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Abhijith S’s picture

FileSize
9.12 KB

Patch applies cleanly on 9.2.x.

after

daffie’s picture

@Abhijith: Could you do a review of the patch. The howto review can be found here: https://www.drupal.org/patch/review.

Vishalghyv’s picture

Status: Needs review » Needs work

Some of the description can be improved like:

The operation the matching should be done with.

Could be rephrased as: Operator to be used for matching

ankithashetty’s picture

Assigned: Unassigned » ankithashetty

Will update the changes suggested by #27 shortly. Thanks!

ankithashetty’s picture

Assigned: ankithashetty » Unassigned
Status: Needs work » Needs review
FileSize
1.71 KB
1.57 KB

Here is an updated patch with an interdiff. Kindly review...

Thank you!

CurriedN’s picture

Thanks for the patch ! Works well !

joachim’s picture

Status: Needs review » Reviewed & tested by the community

That sounds like an RTBC! Thanks for the patch and the review!

init90 made their first commit to this issue’s fork.

  • catch committed b16784b on 9.2.x
    Issue #2850057 by Munavijayalakshmi, gaurav.kapoor, ankithashetty, Pavan...

  • catch committed 79737c3 on 9.1.x
    Issue #2850057 by Munavijayalakshmi, gaurav.kapoor, ankithashetty, Pavan...
catch’s picture

Version: 9.2.x-dev » 9.1.x-dev
Status: Reviewed & tested by the community » Fixed

The added docs look fine to me.

There are several comments on this issue with screenshots of the patch applying, but without actual reviews of the patch, I've removed credit for those since they don't count as reviews. See https://www.drupal.org/core/maintainers/issue-credit for more information.

Committed/pushed to 9.2.x and cherry-picked to 9.1.x, thanks!

Status: Fixed » Closed (fixed)

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