API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Plugin%21...

> Initializes the alter hook.

I don't see how a hook can be 'initialized'.

What this should say is something like:

'Defines the name of the alter hook for the plugin definitions.'

Comments

joachim created an issue. See original summary.

joachim’s picture

Issue tags: -Novice

Actually, I don't think this is a novice issue, as this could really do with explaining the parameters that the alter hook is invoked with, even if that's just done with a @see to the method that does the invoking.

chiranjeeb2410’s picture

Status: Active » Needs review
StatusFileSize
new576 bytes

@joachim,

Uploaded patch with corresponding changes.
Please review.

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.

sarguna raj m’s picture

Assigned: Unassigned » sarguna raj m
sarguna raj m’s picture

Assigned: sarguna raj m » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new286.85 KB

Hi Joachim,

I have tested the chiranjeeb2410's patch #3 manually and it has replaced the "Initializes the alter hook" with "Defines the name of the alter hook for plugin definitions" as you mentioned.

Please refer the attached screenshot.

Thanks.

catch’s picture

Status: Reviewed & tested by the community » Needs work

I'm not sure about this wording either to be honest. It's a setter for the alter hook name (not sure why it's not called setAlterHook()) - so could we just say "Sets the alter hook name." or something like this?

sarguna raj m’s picture

Assigned: Unassigned » sarguna raj m
sarguna raj m’s picture

Assigned: sarguna raj m » Unassigned
Status: Needs work » Needs review
StatusFileSize
new543 bytes

@catch

As per your request, I have created the patch.
Please review the same. :)

joachim’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

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.

catch’s picture

Title: expand and clarify docs for DefaultPluginManager::alterInfo() » Expand and clarify docs for DefaultPluginManager::alterInfo()
Version: 8.6.x-dev » 8.5.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.6.x and cherry-picked to 8.5.x. Thanks!

  • catch committed 7e7e51f on 8.6.x
    Issue #2872355 by sarguna raj M, chiranjeeb2410, joachim: expand and...

  • catch committed 6fbccf3 on 8.5.x
    Issue #2872355 by sarguna raj M, chiranjeeb2410, joachim: expand and...
chiranjeeb2410’s picture

Status: Fixed » Closed (fixed)

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