-
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
- Cms
- Classes
- ComponentBase
Cms\Classes\ComponentBase
Extends:
ComponentBase class
Public properties
public string $id
A unique identifier for this component.
public string $alias
Alias used for this component.
public string $name
Component class name or class alias used in the component declaration in a template.
public boolean $isHidden
Determines whether the component is hidden from the back-end UI.
public string $pluginIcon
Icon of the plugin that defines the component. This field is used by the CMS internally.
public string $componentCssClass
Component CSS class name for the back-end page/layout component list. This field is used by the CMS internally.
public boolean $inspectorEnabled
Determines whether Inspector can be used with the component. This field is used by the CMS internally.
public string $assetPath
Specifies a path to the asset directory.
Show inherited public properties
Inherited public properties
- public array $implement - defined in October\Rain\Extension\Extendable. Extensions implemented by this class.
Protected properties
protected string $dirName
Specifies the component directory name.
protected Cms\Classes\Controller $controller
Controller object.
protected Cms\Classes\PageCode $page
Page object object.
protected array $externalPropertyNames
A collection of external property names used by this component.
protected array $assets
Collection of assets to display in the layout.
protected array $assetBundles
Collection of combined and prioritized assets.
protected array $emitterSingleEventCollection
Collection of registered events to be fired once only.
protected array $emitterEventCollection
Collection of registered events.
protected array $emitterEventSorted
Sorted collection of events.
protected array $properties
Contains the object property values.
Show inherited protected properties
Inherited protected properties
- protected array $extensionData - defined in October\Rain\Extension\Extendable. extensionData contains class reflection information, including behaviors.
- protected static array $extendableCallbacks - defined in October\Rain\Extension\Extendable. Used to extend the constructor of an extendable class.
- protected static array $extendableStaticMethods - defined in October\Rain\Extension\Extendable. Collection of static methods used by behaviors.
- protected static bool $extendableGuardProperties - defined in October\Rain\Extension\Extendable. Indicates if dynamic properties can be created.
Public methods
public mixed __call(string $method, array $parameters)
Dynamically handle calls into the controller instance.
Parameters
- string $method
- array $parameters
public void __construct(null|CodeBase $cmsObject=NULL, array $properties=array())
Component constructor. Takes in the page or layout code section object and properties set by the page or layout.
Parameters
- null|CodeBase $cmsObject
- array $properties
public void __toString()
Returns the component's alias, used by SELF
public void addCss($name, $attributes=array())
addCss includes a StyleSheet asset to the asset list
Parameters
- $name
- $attributes
public void addCssBundle($name, $attributes=array())
addCssBundle includes a CSS asset to the bundled combiner stream
Parameters
- $name
- $attributes
public void addJs($name, $attributes=array())
addJs includes a JavaScript asset to the asset list
Parameters
- $name
- $attributes
public void addJsBundle($name, $attributes=array())
addJsBundle includes a JS asset to the bundled combiner stream
Parameters
- $name
- $attributes
public void addRss($name, $attributes=array())
addRss adds an RSS link asset to the asset list. Call $this->makeAssets() in a view to output corresponding markup.
Parameters
- $name
- $attributes
public self bindEvent($event, $callback, $priority=0)
Create a new event binding.
Parameters
- $event
- $callback
- $priority
public self bindEventOnce($event, $callback)
Create a new event binding that fires once only
Parameters
- $event
- $callback
public void combineAssets($assets, $localPath='')
combineAssets runs asset paths through the Asset Combiner
Parameters
- $assets
- $localPath
public void componentDetails()
componentDetails returns information about this component, including name and description
public void defineProperties()
Defines the properties used by this class. This method should be used as an override in the extended class.
public array fireEvent(string $event, array $params=array(), boolean $halt=false)
Fire an event and call the listeners.
Parameters
- string $event - Event name
- array $params - Event parameters
- boolean $halt - Halt after first non-null result
public mixed fireSystemEvent(string $event, array $params=array(), boolean $halt=true)
Fires a combination of local and global events. The first segment is removed from the event name locally and the local object is passed as the first argument to the event globally. Halting is also enabled by default.
For example:
$this->fireSystemEvent('backend.list.myEvent', ['my value']);
Is equivalent to:
$this->fireEvent('list.myEvent', ['myvalue'], true); Event::fire('backend.list.myEvent', [$this, 'myvalue'], true);
Parameters
- string $event - Event name
- array $params - Event parameters
- boolean $halt - Halt after first non-null result
public string fireViewEvent(string $event, array $params=array())
Special event function used for extending within view files, allowing HTML to be injected multiple times.
For example:
<?= $this->fireViewEvent('backend.auth.extendSigninView') ?>
Parameters
- string $event - Event name
- array $params - Event parameters
public void flushAssets()
Disables the use, and subequent broadcast, of assets. This is useful to call during an AJAX request to speed things up. This method works by specifically targeting the hasAssetsDefined method.
public string getAssetPath(string $fileName, string $assetPath=NULL)
Locates a file based on it's definition. If the file starts with a forward slash, it will be returned in context of the application public path, otherwise it will be returned in context of the asset path.
Parameters
- string $fileName - File to load.
- string $assetPath - Explicitly define an asset path.
public array getAssetPaths()
Returns an array of all registered asset paths.
public void getPath()
getPath returns the absolute component path
public array getProperties()
Returns all properties.
public array getPropertyOptions(string $property)
Returns options for multi-option properties (drop-downs, etc.)
Parameters
- string $property - Specifies the property name
public void hasAssetsDefined()
hasAssetsDefined returns true if assets any have been added
public void init()
Executed when this component is first initialized, before AJAX requests.
public string makeAssets(string $type=NULL)
Outputs <link>
and <script>
tags to load assets previously added with addJs and addCss method calls
Parameters
- string $type - Return an asset collection of a given type (css, rss, js) or null for all.
public void onRender()
Executed when this component is rendered on a page or layout.
public void onRun()
Executed when this component is bound to a page or layout, part of the page life cycle.
public string paramName(string $name, mixed $default=NULL)
Returns the external property name when the property value is a routing parameter reference. Otherwise the default value specified is returned.
Parameters
- string $name - The property name
- mixed $default
public string property(string $name, string $default=NULL)
Returns a defined property value or default if one is not set.
Parameters
- string $name - The property name to look for.
- string $default - A default value to return if no name is found.
public string propertyName(string $name, mixed $default=NULL)
Returns the external property name when the property value is an external property reference. Otherwise the default value specified is returned.
Parameters
- string $name - The property name
- mixed $default
public void renderPartial()
Renders a requested partial in context of this component, see Cms\Classes\Controller@renderPartial for usage.
public boolean runAjaxHandler($handler)
Executes the event cycle when running an AJAX handler.
Parameters
- $handler
public string setExternalPropertyName(string $name, string $extName)
Sets an external property name.
Parameters
- string $name - Property name
- string $extName - External property name
public void setExternalPropertyNames(array $names)
Sets names used by external properties.
Parameters
- array $names - The key should be the property name, the value should be the external property name.
public void setProperties(array $properties)
Sets multiple properties.
Parameters
- array $properties
public void setProperty(string $name, mixed $value)
Sets a property value
Parameters
- string $name
- mixed $value
public self unbindEvent(string $event=NULL)
Destroys an event binding.
Parameters
- string $event - Event to destroy
public array validateProperties(array $properties)
Validates the properties against the defined properties of the class. This method also sets default properties.
Parameters
- array $properties - The supplied property values.
Inherited public methods
- public static void __callStatic($name, $params) - defined in October\Rain\Extension\Extendable.
- public void __get($name) - defined in October\Rain\Extension\Extendable.
- public void __set($name, $value) - defined in October\Rain\Extension\Extendable.
- public void addDynamicMethod(string $dynamicName, callable $method, string $extension=NULL) - defined in October\Rain\Extension\Extendable. Programmatically adds a method to the extendable class.
- public void addDynamicProperty(string $dynamicName, string $value=NULL) - defined in October\Rain\Extension\Extendable. Programmatically adds a property to the extendable class.
- public mixed asExtension(string $shortName) - defined in October\Rain\Extension\Extendable. Short hand for
getClassExtension()
method, except takes the short. - public static void clearExtendedClasses() - defined in October\Rain\Extension\Extendable. Clear the list of extended classes so they will be re-extended.
- public static void extend($callback) - defined in October\Rain\Extension\Extendable.
- public void extendClassWith(string $extensionName) - defined in October\Rain\Extension\Extendable. Dynamically extend a class with a specified behavior.
- public mixed extendableCall(string $name, array $params=NULL) - defined in October\Rain\Extension\Extendable. Magic method for
__call()
. - public static mixed extendableCallStatic(string $name, array $params=NULL) - defined in October\Rain\Extension\Extendable. Magic method for
__callStatic()
. - public void extendableConstruct() - defined in October\Rain\Extension\Extendable. extendableConstruct should be called as part of the constructor.
- public static void extendableExtendCallback(callable $callback) - defined in October\Rain\Extension\Extendable. extendableExtendCallback is a helper method for
::extend()
static method. - public string extendableGet(string $name) - defined in October\Rain\Extension\Extendable. Magic method for
__get()
. - public string extendableSet(string $name, string $value) - defined in October\Rain\Extension\Extendable. Magic method for
__set()
. - public mixed getClassExtension(string $name) - defined in October\Rain\Extension\Extendable. Returns a behavior object from an extendable class, example:.
- public array getClassMethods() - defined in October\Rain\Extension\Extendable. Get a list of class methods, extension equivalent of get_class_methods().
- public array getDynamicProperties() - defined in October\Rain\Extension\Extendable. Returns all dynamic properties and their values.
- public boolean isClassExtendedWith(string $name) - defined in October\Rain\Extension\Extendable. Check if extendable class is extended with a behavior object.
- public boolean methodExists(string $name) - defined in October\Rain\Extension\Extendable. Checks if a method exists, extension equivalent of method_exists().
- public boolean propertyExists(string $name) - defined in October\Rain\Extension\Extendable. Checks if a property exists, extension equivalent of
property_exists()
.
Protected methods
protected void combineBundledAssets($type)
combineBundledAssets spins over every bundle definition and combines them to an asset
Parameters
- $type
protected array emitterEventSortEvents(string $eventName)
Sort the listeners for a given event by priority.
Parameters
- string $eventName
protected string getAssetEntryBuildPath(array $asset)
Internal helper, attaches a build code to an asset path
Parameters
- array $asset - Stored asset array
protected string getAssetScheme(string $asset)
Internal helper, get asset scheme
Parameters
- string $asset - Specifies a path (URL) to the asset.
protected void getComponentAssetPath()
getComponentAssetPath returns the public directory for the component assets
protected void getLocalPath($relativePath)
getLocalPath converts a relative path to a local path
Parameters
- $relativePath
protected void removeDuplicates()
Removes duplicate assets from the entire collection.
protected void renderAssetAttributes($type, $asset)
renderAssetAttributes takes an asset definition and returns the necessary HTML output
Parameters
- $type
- $asset
Show inherited protected methods
Inherited protected methods
- protected boolean extendableIsAccessible(mixed $class, string $propertyName) - defined in October\Rain\Extension\Extendable. Checks if a property is accessible, property equivalent of
is_callable()
. - protected void extensionExtractMethods(string $extensionName, object $extensionObject) - defined in October\Rain\Extension\Extendable. Extracts the available methods from a behavior and adds it to the.