#2199381: Add \Drupal\Core\Path\PathInterface replaced a.o. menu_tree_check_access() by class methods.

I happened to spot a forgotten comment while rerolling something against HEAD, and posted it there. My dear friend Xano says I should fill a new issue and I'm learning to keep my discussions with him about "scope" to a minimum :) So, new issue.

Could this comment be fixed?

    *
    * This function may be used build the data for a menu tree only, for example
    * to further massage the data manually before further processing happens.
-   * menu_tree_check_access() needs to be invoked afterwards.
+   * $this->checkAccess() needs to be invoked afterwards.
    *
    * @param string $menu_name
    *   The name of the menu.
CommentFileSizeAuthor
#2 2227259_2.patch731 bytesroderik
drupal_2199381_19.patch728 bytesroderik

Comments

jhodgdon’s picture

Status: Needs review » Needs work

Looks good. Can you instead of saying $this->checkAccess() refer to MenuTree::checkAccess() instead? That will work better for making links. Thanks!

roderik’s picture

Status: Needs work » Needs review
StatusFileSize
new731 bytes

Alright. Thanks for the pointer, I'll remember for future situations.

eojthebrave’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. Links work fine after the update. Thanks!

  • Commit aded4ea on 8.x by jhodgdon:
    Issue #2227259 by roderik: Fix reference to obsolete menu function in...
jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Committed to 8.x.

Status: Fixed » Closed (fixed)

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