The Plugin class is responsible for resource location and path management of plugins.
Plugins can be located with Plugin. Using Plugin::path('DebugKit');
for example, will give you the full path to the DebugKit plugin:
$path = Plugin::path('DebugKit');
You can check dynamically inside your code if a specific plugin has been loaded:
$isLoaded = Plugin::isLoaded('DebugKit');
Use Plugin::loaded()
if you want to get a list of all currently loaded plugins.
Used to get the location of the plugin’s class files:
$path = App::classPath('DebugKit');
The method returns the path to the plugins’ templates:
$path = Plugin::templatePath('DebugKit');
The same goes for the config path:
$path = Plugin::configPath('DebugKit');