-
Backend
-
Behaviors
-
Classes
-
Controllers
-
Database
-
Seeds
-
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Skins
-
Traits
-
VueComponents
-
Widgets
- ServiceProvider
-
-
Cms
-
Classes
- Asset
- CmsCompoundObject
- CmsController
- CmsException
- CmsObject
- CmsObjectCollection
- CodeBase
- CodeParser
- ComponentBase
- ComponentHelpers
- ComponentManager
- ComponentPartial
- Content
- Controller
- EditorExtension
- Layout
- LayoutCode
- MediaLibrary
- MediaLibraryItem
- MediaViewHelper
- Meta
- ObjectMemoryCache
- Page
- PageCode
- Partial
- PartialCode
- PartialStack
- Router
- Theme
- ThemeManager
-
Components
-
Controllers
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ComponentNode
- ComponentTokenParser
- ContentNode
- ContentTokenParser
- DebugExtension
- DefaultNode
- DefaultTokenParser
- Extension
- FlashNode
- FlashTokenParser
- FrameworkNode
- FrameworkTokenParser
- Loader
- PageNode
- PageTokenParser
- PartialNode
- PartialTokenParser
- PlaceholderNode
- PlaceholderTokenParser
- PutNode
- PutTokenParser
- ScriptsNode
- ScriptsTokenParser
- StylesNode
- StylesTokenParser
-
VueComponents
-
Widgets
- ServiceProvider
-
-
Editor
-
Behaviors
-
Classes
-
Controllers
-
VueComponents
- ServiceProvider
-
-
Media
-
Classes
-
Controllers
-
FormWidgets
-
Twig
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
Console
-
OctoberUtil
- ComposerScript
- OctoberDown
- OctoberFresh
- OctoberMigrate
- OctoberMirror
- OctoberPasswd
- OctoberUp
- OctoberUpdate
- OctoberUtil
- PluginCheck
- PluginDisable
- PluginEnable
- PluginInstall
- PluginList
- PluginRefresh
- PluginRemove
- ProjectSet
- ProjectSync
- ThemeCheck
- ThemeInstall
- ThemeList
- ThemeRemove
- ThemeSync
- ThemeUse
-
-
Controllers
-
Database
-
Facades
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
-
Widgets
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
filter
-
form
-
list
-
menu
-
page
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
object
-
page
-
resizer
-
router
-
template
-
theme
-
-
exception
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
auth
-
form
-
relation
-
/docs/api/model/relation/add
-
/docs/api/model/relation/associate
- attach
-
/docs/api/model/relation/beforeadd
-
/docs/api/model/relation/beforeassociate
- beforeAttach
- beforeDetach
-
/docs/api/model/relation/beforedissociate
-
/docs/api/model/relation/beforeremove
- detach
-
/docs/api/model/relation/dissociate
-
/docs/api/model/relation/remove
-
- afterBoot
- afterCreate
- afterDelete
- afterFetch
- afterRestore
- afterSave
- afterUpdate
- afterValidate
- beforeCreate
- beforeDelete
- beforeFetch
- beforeGetAttribute
- beforeRestore
- beforeSave
- beforeSetAttribute
- beforeUpdate
- beforeValidate
- getAttribute
- saveInternal
- setAttribute
-
-
system
-
assets
-
console
-
mirror
-
theme
-
-
reportwidgets
-
resizer
-
settings
- extendConfigFile
-
-
translator
-
-
Library
-
Argon
-
Assetic
-
Asset
-
Cache
-
Exception
-
Factory
-
Filter
- BaseCssFilter
- CallablesFilter
- CssCacheBustingFilter
- CssImportFilter
- CssMinFilter
- CssRewriteFilter
- FilterCollection
- JavascriptImporter
- JSMinFilter
- JSMinPlusFilter
- JSqueezeFilter
- LessCompiler
- LessphpFilter
- MinifyCssCompressorFilter
- PackagerFilter
- PackerFilter
- ScssCompiler
- ScssphpFilter
- StylesheetMinify
-
Util
- README
- AssetManager
- AssetWriter
- FilterManager
-
-
Auth
-
Models
- AuthException
- Manager
-
-
Config
-
Database
-
Attach
-
Behaviors
-
Concerns
-
Connections
-
Connectors
-
Models
-
Relations
-
Schema
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- DataFeed
- Dongle
- MemoryCache
- MigrationServiceProvider
- Model
- ModelBehavior
- ModelException
- MorphPivot
- NestedTreeScope
- Pivot
- QueryBuilder
- SortableScope
- TreeCollection
- Updater
-
-
Events
-
Exception
-
Extension
-
Filesystem
-
Flash
-
Foundation
-
Bootstrap
-
Console
-
Exception
-
Http
-
Middleware
- Kernel
-
-
Providers
- Application
- Maker
-
-
Halcyon
-
Datasource
-
Exception
-
Processors
-
Traits
- README
- Builder
- Collection
- HalcyonServiceProvider
- MemoryCacheManager
- MemoryRepository
- Model
-
-
Html
-
Mail
-
Network
-
Parse
-
Parsedown
-
Syntax
- Bracket
- Ini
- Markdown
- MarkdownData
- ParseServiceProvider
- Twig
- Yaml
-
-
Process
-
Resize
-
Router
-
Scaffold
-
Support
-
Translation
-
- Documentation
- API
- System
- Classes
- PluginManager
System\Classes\PluginManager
PluginManager
Protected properties
protected $app
The application instance, since Plugins are an extension of a Service Provider
protected $plugins
Container object used for storing plugin information objects.
protected array $pathMap
A map of plugins and their directory paths.
protected bool $registered
Check if all plugins have had the register() method called.
protected bool $booted
Check if all plugins have had the boot() method called.
protected string $metaFile
Path to the disarm file.
protected array $disabledPlugins
Collection of disabled plugins
protected array $registrationMethodCache
Cache of registration method results.
protected static $instance
Public methods
public void __clone()
public void __wakeup()
public void bindContainerObjects()
bindContainerObjects rebinds to the container because these objects are "soft singletons" and may be lost when the IoC container reboots. This provides a way to rebuild for the purposes of unit testing.
public void bootAll($force=false)
Runs the boot() method on all plugins. Can only be called once.
Parameters
- $force
public void bootPlugin(PluginBase $plugin)
Registers a single plugin object.
Parameters
- PluginBase $plugin
public void clearDisabledCache()
public void deletePlugin(string $id)
Completely roll back and delete a plugin from the system.
Parameters
- string $id - Plugin code/namespace
public bool disablePlugin(string $id, bool $isUser=false)
Disables a single plugin in the system.
Parameters
- string $id - Plugin code/namespace
- bool $isUser - Set to true if disabled by the user
public bool enablePlugin(string $id, bool $isUser=false)
Enables a single plugin in the system.
Parameters
- string $id - Plugin code/namespace
- bool $isUser - Set to true if enabled by the user
public boolean exists(string $id)
exists checks if a plugin exists and is enabled
Parameters
- string $id - Plugin identifier, eg: Namespace.PluginName
public void findByIdentifier($identifier)
findByIdentifier returns a plugin registration class based on its identifier (Author.Plugin)
Parameters
- $identifier
public void findByNamespace($namespace)
findByNamespace returns a plugin registration class based on its namespace (Author\Plugin)
Parameters
- $namespace
public array findMissingDependencies()
Scans the system plugins to locate any dependencies that are not currently installed. Returns an array of plugin codes that are needed.
PluginManager::instance()->findMissingDependencies();
public static void forgetInstance()
Forget this singleton's instance if it exists
public void getAllPlugins()
getAllPlugins regardless of enabled state
public void getComposerCode($id)
getComposerCode finds the composer code for a plugin
Parameters
- $id
public array getDependencies(string $plugin)
Returns the plugin identifiers that are required by the supplied plugin.
Parameters
- string $plugin - Plugin identifier, object or class
public string getIdentifier(mixed $namespace)
Resolves a plugin identifier from a plugin class name or object.
Parameters
- mixed $namespace - Plugin class name or object
public void getPluginNamespaces()
Returns a flat array of vendor plugin namespaces and their paths
public void getPluginPath($id)
getPluginPath returns the directory path to a plugin
Parameters
- $id
public void getPlugins()
getPlugins an array with all registered plugins The index is the plugin namespace, the value is the plugin information object.
public array getRegistrationMethodValues(string $methodName)
Spins over every plugin object and collects the results of a method call.
Parameters
- string $methodName
public void getVendorAndPluginNames()
Returns a 2 dimensional array of vendors and their plugins.
public void hasPlugin($namespace)
hasPlugin checks to see if a plugin has been registered
Parameters
- $namespace
public static void instance()
Create a new instance of this singleton.
public boolean isDisabled($id)
Determines if a plugin is disabled by looking at the meta information or the application configuration.
Parameters
- $id
public void loadPlugin($namespace, $path)
loadPlugin loads a single plugin in to the manager where a namespace is Acme\Blog and the path is somewhere on the disk
Parameters
- $namespace
- $path
public void loadPlugins()
loadPlugins finds all available plugins and loads them in to the $plugins array
public string normalizeIdentifier(string $id)
Takes a human plugin code (acme.blog) and makes it authentic (Acme.Blog)
Parameters
- string $id
public void refreshPlugin(string $id)
Tears down a plugin's database tables and rebuilds them.
Parameters
- string $id - Plugin code/namespace
public void registerAll($force=false)
registerAll runs the register() method on all plugins and can only be called once
Parameters
- $force
public void registerPlugin(PluginBase $plugin, string $pluginId=NULL)
Registers a single plugin object.
Parameters
- PluginBase $plugin
- string $pluginId
public void sortByDependencies($plugins=NULL)
Parameters
- $plugins
public void unregisterAll()
unregisterAll unregisters all plugins: the negative of registerAll()
Protected methods
protected void __construct()
Constructor.
protected void init()
init initializes the plugin manager
protected void loadDependencies()
Cross checks all plugins and their dependancies, if not met plugins are disabled and vice versa.
protected void loadDisabled()
Loads all disables plugins from the meta file.
protected void populateDisabledPluginsFromDb()
Populates information about disabled plugins from database
protected array sortDependencies()
Sorts a collection of plugins, in the order that they should be actioned, according to their given dependencies. Least dependent come first.
protected void writeDisabled()
Write the disabled plugins to a meta file.