-
Docs
Backend
-
Behaviors
-
Classes
-
Controllers
-
Database
-
Seeds
-
-
Facades
-
FormWidgets
-
Helpers
-
Exception
- Backend
-
-
Models
-
ReportWidgets
-
Skins
-
Traits
-
Widgets
- ServiceProvider
-
-
Cms
-
Classes
- Asset
- AutoDatasource
- CmsCompoundObject
- CmsController
- CmsException
- CmsObject
- CmsObjectCollection
- CodeBase
- CodeParser
- ComponentBase
- ComponentHelpers
- ComponentManager
- ComponentPartial
- Content
- Controller
- Layout
- LayoutCode
- MediaLibrary
- MediaLibraryItem
- MediaViewHelper
- Meta
- ObjectMemoryCache
- Page
- PageCode
- Partial
- PartialCode
- PartialStack
- Router
- Theme
- ThemeManager
-
Components
-
Contracts
-
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
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
Console
-
Controllers
-
Database
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
filter
-
form
-
list
-
menu
-
page
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
object
-
page
-
router
-
template
-
theme
-
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
system
-
assets
-
console
-
mirror
-
theme
-
-
reportwidgets
-
settings
- extendConfigFile
-
-
translator
-
-
Library
-
Argon
-
Auth
-
Models
- AuthException
- Manager
-
-
Config
-
Cookie
-
Middleware
-
-
Database
-
Attach
-
Behaviors
-
Concerns
-
Connections
-
Connectors
-
Models
-
Relations
-
Schema
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- DataFeed
- Dongle
- MemoryCache
- Model
- ModelBehavior
- ModelException
- 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
-
Router
-
Scaffold
-
Support
-
Translation
-
- Documentation
- API
- Cms
- Classes
- CodeBase
Cms\Classes\CodeBase
Source: ~/modules/cms/classes/CodeBase.php
Extends:
Implements:
- ArrayAccess
Parent class for PHP classes created for layout and page code sections.
Public properties
public Cms\Classes\Page $page
Specifies the current page
public Cms\Classes\Layout $layout
Specifies the current layout
public Cms\Classes\controller $controller
Specifies the CMS controller
Show inherited public properties
Inherited public properties
- public array $implement - defined in October\Rain\Extension\Extendable. Extensions implemented by this class.
Protected properties
There are no protected properties in the class.
Show inherited protected properties
Inherited protected properties
- protected array $extensionData - defined in October\Rain\Extension\Extendable. 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(Cms\Classes\Page $page, Cms\Classes\Layout $layout, Cms\Classes\Controller $controller)
Creates the object instance.
Parameters
- Cms\Classes\Page $page - Specifies the CMS page.
- Cms\Classes\Layout $layout - Specifies the CMS layout.
- Cms\Classes\Controller $controller - Specifies the CMS controller.
public void __get(string $name)
This object is referenced as $this->page in Cms\Classes\ComponentBase, so to avoid $this->page->page this method will proxy there. This is also used as a helper for accessing controller variables/components easier in the page code, eg. $this->foo instead of $this['foo']
Parameters
- string $name
public bool __isset(string $name)
This will check if a property is set on the CMS Page object.
Parameters
- string $name
public void __set(string $name, mixed $value)
This will set a property on the CMS Page object.
Parameters
- string $name
- mixed $value
public void offsetExists($offset)
ArrayAccess implementation
Parameters
- $offset
public void offsetGet($offset)
ArrayAccess implementation
Parameters
- $offset
public void offsetSet($offset, $value)
ArrayAccess implementation
Parameters
- $offset
- $value
public void offsetUnset($offset)
ArrayAccess implementation
Parameters
- $offset
public void onEnd()
This event is triggered in the end of the execution cycle, but before the page is displayed. The layout's onEnd method triggers after the page's onEnd method.
public void onInit()
This event is triggered when all components are initialized and before AJAX is handled. The layout's onInit method triggers before the page's onInit method.
public void onStart()
This event is triggered in the beginning of the execution cycle. The layout's onStart method triggers before the page's onStart method.
Inherited public methods
- public static void __callStatic($name, $params) - 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. This method should be called as part of the constructor.
- public static void extendableExtendCallback(callable $callback) - defined in October\Rain\Extension\Extendable. 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
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.