Back to Joomla project (class list)

Class ExtensionHelper - list of methods

Extension Helper class.
Package: Joomla\CMS\Extension
Copyright: (C) 2017 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Extension/ExtensionHelper.php
Project: Joomla

Method Summary

public static array
()

Gets the core extensions.
Returns
  • array Array with core extensions. Each extension is an array with following format: `type`, `element`, `folder`, `client_id`.
Since
  • 3.7.4
Show source code of this method: getCoreExtensions Source Code

public static array
()

Returns an array of core extension IDs.
Returns
  • array
Since
  • 4.0.0
-
  • \RuntimeException
Show source code of this method: getCoreExtensionIds Source Code

public static bool
(mixed $type, mixed $element, mixed $clientId = 0, mixed $folder = '')

Check if an extension is core or not
Parameters
  • string $type The extension's type.
  • string $element The extension's element name.
  • int $clientId The extension's client ID. Default 0.
  • string $folder The extension's folder. Default ''.
Returns
  • bool True if core, false if not.
Since
  • 3.7.4
Show source code of this method: checkIfCoreExtension Source Code

public static \stdClass|null
(string $element, string $type, ?int $clientId = null, ?string $folder = null)

Returns an extension record for the given name.
Parameters
  • string $element The extension element
  • string $type The extension type
  • int|null $clientId The client ID
  • string|null $folder Plugin folder
Returns
  • \stdClass|null The object or null if not found.
Since
  • 4.0.0
-
  • \InvalidArgumentException
Show source code of this method: getExtensionRecord Source Code

Properties Summary

public static array
$extensions
The loaded extensions.
Since
  • 4.0.0
private static array
$loadedExtensions
The loaded extensions.
Since
  • 4.0.0
protected static array
$coreExtensions
Array of core extensions Each element is an array with elements "type", "element", "folder" and "client_id".
Since
  • 3.7.4
protected static array
$coreExtensionIds
Array of core extension IDs.
Since
  • 4.0.0

Tags Summary

Since
3.7.4
Deprecated
4.0
Replace class with a non static methods for better testing