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

The example code given for ModuleHandler::loadInclude() is the following one.

  // Load node.admin.inc from the node module.
  $this->loadInclude('node', 'inc', 'node.admin');
  // Load content_types.inc from the node module.
  $this->loadInclude('node', 'inc', ''content_types');

''content_types' starts with two string delimiters.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kiamlaluno created an issue. See original summary.

apaderno’s picture

Status: Active » Needs review
FileSize
699 bytes
tetranz’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. Applied successfully.

Wim Leers’s picture

Priority: Normal » Minor
Issue tags: +Trivial patch of the month

👍

  • Gábor Hojtsy committed 5a4d7a0 on 8.3.x
    Issue #2885522 by kiamlaluno: ModuleHandler::loadInclude() example...

  • Gábor Hojtsy committed e3979f2 on 8.4.x
    Issue #2885522 by kiamlaluno: ModuleHandler::loadInclude() example...
Gábor Hojtsy’s picture

Version: 8.4.x-dev » 8.3.x-dev
Status: Reviewed & tested by the community » Fixed

Good find, thanks.

Status: Fixed » Closed (fixed)

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