Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Extension.php

function Extension::load

Same name in this branch
  1. 11.1.x core/lib/Drupal/Core/Extension/Extension.php \Drupal\Core\Extension\Extension::load()

Loads the main extension file, if any.

Return value

bool TRUE if this extension has a main extension file, FALSE otherwise.

File

vendor/mglaman/phpstan-drupal/src/Drupal/Extension.php, line 186

Class

Extension
Defines an extension (file) object.

Namespace

mglaman\PHPStanDrupal\Drupal

Code

public function load() : bool {
    if ($this->filename !== null) {
        include_once $this->root . '/' . $this->getPath() . '/' . $this->filename;
        return true;
    }
    return false;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal