-
Backend
-
Behaviors
-
FormController
-
ImportExportController
-
ListController
-
RelationController
- FormController
- ImportExportController
- ListController
- RelationController
- ReorderController
- UserPreferencesModel
-
-
Classes
-
Dashboard
-
NavigationManager
-
WidgetManager
- AuthManager
- BackendController
- Controller
- ControllerBehavior
- DashboardManager
- DashboardWidgetBase
- FilterScope
- FilterWidgetBase
- FormField
- FormTabs
- FormWidgetBase
- ListColumn
- LoginCustomization
- MainMenuItem
- NavigationManager
- ReportDataSourceBase
- ReportDataSourceManager
- ReportWidgetBase
- RoleManager
- RolePermission
- SettingsController
- SideMenuItem
- Skin
- StaticReportWidgetContainer
- VueComponentBase
- WidgetBase
- WidgetManager
- WildcardController
-
-
Controllers
-
Database
-
Facades
-
FilterWidgets
-
FormWidgets
-
Helpers
-
Models
-
BrandSetting
-
ExportModel
-
ImportModel
- AccessLog
- BrandSetting
- Dashboard
- EditorSetting
- ExportModel
- ImportModel
- Preference
- ReportDataCache
- User
- UserGroup
- UserPreference
- UserPreferenceModel
- UserRole
- UserThrottle
-
-
ReportWidgets
-
Skins
-
Traits
-
VueComponents
-
Widgets
-
Filter
-
Form
-
Lists
-
Table
- Filter
- Form
- Lists
- ListStructure
- ReportContainer
- RoleImpersonator
- Search
- SiteSwitcher
- Table
- Toolbar
-
- ServiceProvider
-
-
Cms
-
Classes
-
Controller
-
EditorExtension
-
Layout
-
Page
-
Partial
-
Theme
- AjaxResponse
- Asset
- CmsCompoundObject
- CmsController
- CmsDemoTrafficDataGenerator
- CmsException
- CmsObject
- CmsObjectCache
- CmsObjectCollection
- CmsReportDataSource
- CmsStatusDataSource
- CodeBase
- CodeParser
- ComponentBase
- ComponentBehavior
- ComponentHelpers
- ComponentManager
- ComponentModuleBase
- ComponentPartial
- Content
- Controller
- EditorExtension
- Layout
- LayoutCode
- Meta
- Page
- PageCode
- PageManager
- Partial
- PartialCode
- PartialStack
- PartialWatcher
- Router
- Snippet
- SnippetManager
- Theme
- ThemeManager
- ThisVariable
- TrafficLogger
-
-
Components
-
Console
-
Controllers
-
Database
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- AjaxPartialTokenParser
- ComponentNode
- ComponentTokenParser
- ContentNode
- ContentTokenParser
- DebugExtension
- DefaultNode
- DefaultTokenParser
- Extension
- FlashNode
- FlashTokenParser
- FrameworkNode
- FrameworkTokenParser
- GetAttrAdjuster
- GetAttrNode
- Loader
- MetaNode
- MetaTokenParser
- PageNode
- PageTokenParser
- PartialNode
- PartialTokenParser
- PlaceholderNode
- PlaceholderTokenParser
- PutNode
- PutTokenParser
- ScriptsNode
- ScriptsTokenParser
- StylesNode
- StylesTokenParser
-
VueComponents
-
Widgets
- ServiceProvider
-
-
Editor
-
Behaviors
-
Classes
-
Controllers
-
Traits
-
VueComponents
- ServiceProvider
-
-
Media
-
Classes
-
Controllers
-
FormWidgets
-
Helpers
-
Twig
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
PresetManager
-
SiteManager
-
UiManager
-
UpdateManager
- AppBase
- CombineAssets
- DependencyResolver
- DriverBehavior
- ErrorHandler
- MailManager
- ManifestCache
- MarkupExtensionItem
- MarkupManager
- ModelBehavior
- PagerElement
- PluginBase
- PluginManager
- PresetManager
- ProductDetail
- RateLimiter
- ResizeImageItem
- ResizeImages
- SettingsManager
- SettingsMenuItem
- SiteManager
- SystemController
- SystemReportDataSource
- UiElement
- UiManager
- UpdateManager
- VersionManager
-
-
Console
- ComposerScript
- OctoberAbout
- OctoberDown
- OctoberFresh
- OctoberMigrate
- OctoberMirror
- OctoberOptimize
- OctoberPasswd
- OctoberUp
- OctoberUpdate
- OctoberUtil
- OctoberUtilCommands
- OctoberUtilPatches
- OctoberUtilRefitLang
- PluginCheck
- PluginDisable
- PluginEnable
- PluginInstall
- PluginList
- PluginRefresh
- PluginRemove
- PluginSeed
- PluginTest
- ProjectSync
-
Controllers
-
Database
-
Facades
-
Helpers
-
Middleware
-
Models
-
ReportWidgets
-
Traits
-
Twig
-
Widgets
- ServiceProvider
-
-
Tailor
-
Behaviors
-
Classes
-
Blueprint
-
BlueprintIndexer
-
EditorExtension
-
Relations
-
SchemaBuilder
-
Scopes
- Blueprint
- BlueprintCollection
- BlueprintErrorData
- BlueprintException
- BlueprintIndexer
- BlueprintModel
- BlueprintVerifier
- ComponentVariable
- ContentFieldBase
- EditorExtension
- FieldManager
- Fieldset
- NavigationItem
- PermissionItem
- RecordIndexer
- SchemaBuilder
- SchemaPruner
-
-
Components
-
Console
-
ContentFields
-
Controllers
-
Models
-
EntryRecord
-
GlobalRecord
-
RecordImport
- ContentSchema
- EntryRecord
- GlobalRecord
- NestedFormItem
- PreviewToken
- RecordExport
- RecordImport
- RepeaterItem
-
-
Traits
-
VueComponents
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
brand
-
files
-
filter
-
form
-
list
-
menu
-
page
-
roles
-
site
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
internalTrafficStatistics
-
object
-
page
-
pageLookup
-
resizer
-
router
-
sitePicker
-
template
-
theme
- extendTwig
-
-
deferredBinding
-
editor
-
extension
-
-
exception
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
auth
-
filter
-
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
-
-
/docs/api/model/afterboot
-
/docs/api/model/aftercreate
-
/docs/api/model/afterdelete
-
/docs/api/model/afterfetch
-
/docs/api/model/afterinit
- afterRelation
- afterRestore
-
/docs/api/model/aftersave
- afterTrash
-
/docs/api/model/afterupdate
- afterValidate
-
/docs/api/model/beforecreate
-
/docs/api/model/beforedelete
-
/docs/api/model/beforefetch
- beforeGetAttribute
- beforeRelation
- beforeReplicate
- beforeRestore
-
/docs/api/model/beforesave
- beforeSetAttribute
-
/docs/api/model/beforeupdate
- beforeValidate
- extendBlueprint
- getAttribute
- newInstance
- saveInternal
- setAttribute
-
-
pages
-
snippet
-
-
site
-
system
-
assets
- beforeAddAsset
-
/docs/api/system/assets/beforebundleasset
-
console
-
mirror
-
-
mail
-
reportwidgets
-
resizer
-
settings
-
site
-
updater
- extendConfigFile
- extendTwig
-
-
tailor
-
user
-
-
Library
-
Argon
-
Assetic
-
Asset
-
Cache
-
Exception
-
Factory
-
Filter
-
Traits
-
Util
- README
- AsseticServiceProvider
- AssetManager
- AssetWriter
- Combiner
- FilterManager
-
-
Auth
-
Combine
-
Composer
-
Config
-
Database
-
Attach
-
Concerns
-
Connections
-
Connectors
-
Factories
-
Models
-
Relations
-
Schema
-
Scopes
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- Dongle
- ExpandoModel
- MigrationServiceProvider
- Model
- ModelBehavior
- ModelException
- MorphPivot
- NestedTreeScope
- Pivot
- QueryBuilder
- Replicator
- SortableScope
- TreeCollection
- Updater
-
-
Element
-
Filter
-
Form
-
Lists
-
Navigation
- ElementBase
- ElementHolder
-
-
Events
-
Exception
-
Extension
-
Filesystem
-
Flash
-
Foundation
-
Bootstrap
-
Console
-
Exception
-
Http
-
Middleware
- Kernel
-
-
Providers
- Application
-
-
Halcyon
-
Concerns
-
Datasource
-
Exception
-
Processors
-
Traits
- README
- Builder
- Collection
- HalcyonServiceProvider
- Model
-
-
Html
-
Mail
-
Network
-
Parse
-
Resize
-
Router
-
Scaffold
-
Support
-
Debug
-
Facades
-
Traits
- README
- Arr
- ClassLoader
- Collection
- Facade
- ModuleServiceProvider
- SafeCollection
- ServiceProvider
- Singleton
- Str
-
-
Translation
-
Validation
-
- Documentation
- API
- System
- Classes
- VersionManager
System\Classes\VersionManager
Overview
VersionManager manages the versions and database updates for plugins
Protected Properties
protected array $fileVersions
fileVersions cache of plugin versions as files.
protected array $databaseVersions
databaseVersions cache of database versions
protected array $databaseHistory
databaseHistory cache of database history
protected System\Classes\PluginManager $pluginManager
protected Illuminate\Console\OutputStyle $notesOutput
protected Illuminate\Console\Command $notesCommand
Public Methods
public __construct()
public __construct(): void
__construct this class
public getLatestVersion()
public getLatestVersion(string $plugin): void
getLatestVersion returns the latest version for a plugin
public getNotesCommand()
public getNotesCommand(): Illuminate\Console\Command|null
getNotesOutput returns the note command object, if available.
public getNotesOutput()
public getNotesOutput(): Illuminate\Console\OutputStyle|null
getNotesOutput returns the note output, used by command line.
public hasVersion()
public hasVersion($plugin, $version): bool
hasVersion will return true if a plugin has been registered at a supplied version
public static instance()
public static instance(): static
instance creates a new instance of this singleton
public listNewVersions()
public listNewVersions($plugin): void
listNewVersions returns a list of unapplied plugin versions
public purgePlugin()
public purgePlugin(string $pluginCode): void
purgePlugin deletes all records from the version and history tables for a plugin
public removePlugin()
public removePlugin($plugin, $toVersion = null): bool
removePlugin removes and packs down a plugin from the system. Files are left intact If the $toVersion parameter is specified, the process stops after the specified version is rolled back.
public removePluginToVersion()
public removePluginToVersion( $plugin, $toVersion, $includeVersion = false ): bool
removePluginToVersion will remove the plugin version up to a specified one, you may also specify to include that version itself as part of the rollback.
public setNotesCommand()
public setNotesCommand(Illuminate\Console\Command $command): void
setNotesCommand sets the fully qualified command for writing notes.
public setNotesOutput()
public setNotesOutput(Illuminate\Console\OutputStyle $output): self
setNotesOutput sets an output stream for writing notes.
public updatePlugin()
public updatePlugin($plugin, $toVersion = null): void
updatePlugin updates a single plugin by its code or object with it's latest changes If the $toVersion parameter is specified, the process stops after the specified version is applied.
Protected Methods
protected applyDatabaseComment()
protected applyDatabaseComment($code, $version, $comment): void
applyDatabaseComment registers a database update comment in the history table
protected applyDatabaseScript()
protected applyDatabaseScript($code, $version, $script): void
applyDatabaseScript registers a database update script in the history table
protected applyPluginUpdate()
protected applyPluginUpdate($code, $version, $details): void
applyPluginUpdate applies a single version update to a plugin.
protected extractScriptsAndComments()
protected extractScriptsAndComments($details): array
extractScriptsAndComments extracts script and comments from version details
protected getDatabaseHistory()
protected getDatabaseHistory($code): void
getDatabaseHistory returns all the update history for a plugin
protected getDatabaseVersion()
protected getDatabaseVersion($code): void
getDatabaseVersion returns the latest version of a plugin from the database
protected getFileVersions()
protected getFileVersions($code): void
getFileVersions returns all versions of a plugin from its version file
protected getLatestFileVersion()
protected getLatestFileVersion($code): void
getLatestFileVersion returns the latest version of a plugin from its version file
protected getNewFileVersions()
protected getNewFileVersions($code, $version = null): void
getNewFileVersions returns any new versions from a supplied version, ie. unapplied versions
protected getUpdater()
protected getUpdater(): October\Rain\Database\Updater
getUpdater returns the updater service
protected getVersionFile()
protected getVersionFile($code): string
getVersionFile returns the absolute path to a version file for a plugin, the string is empty if no file is found or resolved
protected hasDatabaseHistory()
protected hasDatabaseHistory($code, $version, $script = null): void
hasDatabaseHistory checks if a plugin has an applied update version
protected hasVersionFile()
protected hasVersionFile($code): bool
hasVersionFile checks if a plugin has a version file
protected normalizeVersion()
protected normalizeVersion($version): string
normalizeVersion checks some versions start with v and others not
protected note()
protected note(string $message): self
note writes a note event for the migrator.
protected removeDatabaseComment()
protected removeDatabaseComment($code, $version): void
removeDatabaseComment removes a database update comment in the history table
protected removeDatabaseScript()
protected removeDatabaseScript($code, $version, $script): void
removeDatabaseScript removes a database update script in the history table
protected resetCacheForCode()
protected resetCacheForCode($code): void
resetCacheForCode will reset the cache for a specified plugin code
protected setDatabaseVersion()
protected setDatabaseVersion($code, $version = null): void
setDatabaseVersion updates a plugin version in the database, if the version is not specified then the version is reset to empty.