API documentation shows that hook_view() takes two parameters, the node and the view mode. However, node_build_content() shows hook_view() being invoked with three parameters, the third being the $langcode.

Comments

jhodgdon’s picture

Issue tags: +Novice

Agreed, good catch! Just needs a patch. Note: doesn't exist in Drupal 8.

joshi.rohit100’s picture

Status: Active » Needs review
StatusFileSize
new1017 bytes

Updated. Took the $langcode documentation from node_build_content().

jhodgdon’s picture

Status: Needs review » Needs work

Looks good, thanks! Can you add a blank line between the last @param and the @return?

rpayanm’s picture

Status: Needs work » Needs review
StatusFileSize
new560 bytes
new1022 bytes
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x - thanks!

  • David_Rothstein committed 437ceb6 on
    Issue #2453389 by rpayanm, joshi.rohit100: hook_view() does not document...

Status: Fixed » Closed (fixed)

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