Drupal 8  8.0.2
Extension Class Reference
Inheritance diagram for Extension:

Public Member Functions

 __construct ($root, $type, $pathname, $filename=NULL)
 
 getType ()
 
 getName ()
 
 getPath ()
 
 getPathname ()
 
 getFilename ()
 
 getExtensionPathname ()
 
 getExtensionFilename ()
 
 load ()
 
 __call ($method, array $args)
 
 serialize ()
 
 unserialize ($data)
 

Protected Attributes

 $type
 
 $pathname
 
 $filename
 
 $splFileInfo
 
 $root
 

Detailed Description

Defines an extension (file) object.

Constructor & Destructor Documentation

__construct (   $root,
  $type,
  $pathname,
  $filename = NULL 
)

Constructs a new Extension object.

Parameters
string$rootThe app root.
string$typeThe type of the extension; e.g., 'module'.
string$pathnameThe relative path and filename of the extension's info file; e.g., 'core/modules/node/node.info.yml'.
string$filename(optional) The filename of the main extension file; e.g., 'node.module'.

References Drupal\root().

Here is the call graph for this function:

Member Function Documentation

__call (   $method,
array  $args 
)

Re-routes method calls to SplFileInfo.

Offers all SplFileInfo methods to consumers; e.g., $extension->getMTime().

getExtensionFilename ( )

Returns the name of the main extension file, if any.

Returns
string|null
getExtensionPathname ( )

Returns the relative path of the main extension file, if any.

Returns
string|null

References Extension\getPath().

Here is the call graph for this function:

getFilename ( )

Returns the filename of the extension's info file.

Returns
string
getName ( )

Returns the internal name of the extension.

Returns
string

Referenced by ThemeHandler\addTheme(), ThemeInitialization\getActiveTheme(), and UpdateRegistry\loadUpdateFile().

Here is the caller graph for this function:

getPath ( )

Returns the relative path of the extension.

Returns
string

Referenced by ThemeInitialization\getActiveTheme(), InstallStorage\getComponentFolder(), Extension\getExtensionPathname(), ProjectInfo\getProjectName(), Extension\load(), UpdateRegistry\loadUpdateFile(), and FieldDefinitionIntegrityTest\setUp().

Here is the caller graph for this function:

getPathname ( )

Returns the relative path and filename of the extension's info file.

Returns
string
getType ( )

Returns the type of the extension.

Returns
string
load ( )

Loads the main extension file, if any.

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

References Extension\getPath(), and Drupal\root().

Here is the call graph for this function:

serialize ( )

Implements Serializable::serialize().

Serializes the Extension object in the most optimized way.

unserialize (   $data)

{}

References Drupal\root().

Here is the call graph for this function:


The documentation for this class was generated from the following file: