First paramater of function hook_pathauto_pattern_alter() is documented as string but in fact it is an object.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

junkuncz created an issue. See original summary.

junkuncz’s picture

junkuncz’s picture

Status: Active » Needs review
junkuncz’s picture

Dinesh18’s picture

Status: Needs review » Reviewed & tested by the community

#2 Looks good to me. +1 to RTBC

tompagabor’s picture

Title: Wrong function documentation » Wrong documentation in hook_pathauto_pattern_alter

+1
Small but very useful fix. Makes a lot easier to debug code.

tompagabor’s picture

Berdir’s picture

Status: Reviewed & tested by the community » Needs work

It's not just any object, it's a pattern config entity, so we should use the correct type.

Dinesh18’s picture

Status: Needs work » Needs review
FileSize
776 bytes
756 bytes

Here is the updated patch and interdiff as per comment #8

nkoporec’s picture

Tested the patch and it looks good.

datvance’s picture

Also, 'type' key should be 'bundle' in $context documentation. new patch and interdiff attached.

amietpatial’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
185.37 KB

I have checked the documentation it's fine.

nkoporec’s picture

Tested the latest patch and applies cleanly.

amietpatial’s picture

idebr’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

There is an earlier issue regarding this hook in #2692205: Update hook_pathauto_pattern_alter() documentation. I'll close this issue as a duplicate, so we can focus our effort in the related issue.

I added you as contributors in the related issue, so you are credited correctly when the issue is committed.