Cell base.
$View protected Instance of the View created during rendering. Won't be set until after Cell::__toString()/render() is called.
$_cache protected array|boolean$_validCellOptions protected arrayList of valid options (constructor's fourth arguments) Override this property in subclasses to whitelist which options you want set as properties in your Cell.
$_validViewOptions protected array$action protected string$args protected array$request protected An instance of a Cake\Http\ServerRequest object that contains information about the current request. This object contains all the information about a request and several methods for reading additional information about the request.
$response protected _eventClass, _eventManager _tableLocator _modelFactories, _modelType, modelClass _viewBuilder, viewClass, viewVars __construct( Cake\Http\ServerRequest $request = null , Cake\Http\Response $response = null , Cake\Event\EventManager $eventManager = null , array $cellOptions = [] )
Constructor.
Cake\Http\ServerRequest $request optional null Cake\Http\Response $response optional null Cake\Event\EventManager $eventManager optional null $cellOptions optional [] __get( string $name )
Magic accessor for removed properties.
$name __set( string $name , mixed $value )
Magic setter for removed properties.
$name $value __toString( )
Magic method.
Starts the rendering process when Cell is echoed.
Note This method will trigger an error when view rendering has a problem. This is because PHP will not allow a __toString() method to throw an exception.
_cacheConfig( string $action , string|null $template = null )
Generate the cache key to use for this cell.
If the key is undefined, the cell class and action name will be used.
$action $template optional null initialize( )
Initialization hook method.
Implement this method to avoid having to overwrite the constructor and calling parent::__construct().
render( string|null $template = null )
Render the cell.
$template optional null Custom template name to render. If not provided (null), the last value will be used. This value is automatically set by CellTrait::cell().
Cake\View\Exception\MissingCellViewExceptiondispatchEvent( string $name , array|null $data = null , object|null $subject = null )
Wrapper for creating and dispatching events.
Returns a dispatched event.
$name $data optional null Any value you wish to be transported with this event to it can be read by listeners.
$subject optional null The object that this event applies to ($this by default).
Cake\Event\EventeventManager( Cake\Event\EventManager $eventManager = null )
Returns the Cake\Event\EventManager manager instance for this object.
You can use this instance to register any new listeners or callbacks to the object events, or create your own events and trigger them at will.
Cake\Event\EventManager $eventManager optional null Cake\Event\EventManagergetEventManager( )
Returns the Cake\Event\EventManager manager instance for this object.
You can use this instance to register any new listeners or callbacks to the object events, or create your own events and trigger them at will.
Cake\Event\EventManagersetEventManager( Cake\Event\EventManager $eventManager )
Returns the Cake\Event\EventManager manager instance for this object.
You can use this instance to register any new listeners or callbacks to the object events, or create your own events and trigger them at will.
Cake\Event\EventManager $eventManager getTableLocator( )
Gets the table locator.
Cake\ORM\Locator\LocatorInterfacesetTableLocator( Cake\ORM\Locator\LocatorInterface $tableLocator )
Sets the table locator.
Cake\ORM\Locator\LocatorInterface $tableLocator tableLocator( Cake\ORM\Locator\LocatorInterface $tableLocator = null )
Sets the table locator. If no parameters are passed, it will return the currently used locator.
Cake\ORM\Locator\LocatorInterface $tableLocator optional null Cake\ORM\Locator\LocatorInterface_setModelClass( string $name )
Set the modelClass and modelKey properties based on conventions.
If the properties are already set they will not be overwritten
$name getModelType( )
Get the model type to be used by this class
loadModel( string|null $modelClass = null , string|null $modelType = null )
Loads and constructs repository objects required by this object
Typically used to load ORM Table objects as required. Can also be used to load other types of repository objects your application uses.
If a repository provider does not return an object a MissingModelException will be thrown.
$modelClass optional null Name of model class to load. Defaults to $this->modelClass. The name can be an alias like 'Post' or FQCN like App\Model\Table\PostsTable::class.
$modelType optional null Cake\Datasource\RepositoryInterfaceCake\Datasource\Exception\MissingModelExceptionmodelFactory( string $type , callable $factory )
Override a existing callable to generate repositories of a given type.
$type $factory modelType( string|null $modelType = null )
Set or get the model type to be used by this class
$modelType optional null Cake\Datasource\ModelAwareTraitsetModelType( string $modelType )
Set the model type to be used by this class
$modelType createView( string|null $viewClass = null )
Constructs the view class instance based on the current configuration.
$viewClass optional null Cake\View\ViewCake\View\Exception\MissingViewExceptionset( string|array $name , mixed $value = null )
Saves a variable or an associative array of variables for use inside a template.
$name $value optional null Value in case $name is a string (which then works as the key). Unused if $name is an associative array, otherwise serves as the values to $name's keys.
viewBuilder( )
Get the view builder being used.
Cake\View\ViewBuilderviewOptions( string|array|null $options = null , boolean $merge = true )
Get/Set valid view options in the object's _validViewOptions property. The property is created as an empty array if it is not set. If called without any parameters it will return the current list of valid view options. See createView().
$options optional null $merge optional true Whether to merge with or override existing valid View options. Defaults to true.
protected Cake\View\View
Instance of the View created during rendering. Won't be set until after Cell::__toString()/render() is called.
protected array
List of valid options (constructor's fourth arguments) Override this property in subclasses to whitelist which options you want set as properties in your Cell.
[]
protected array
These properties can be set directly on Cell and passed to the View as options.
Cake\View\View[
'viewPath'
] protected Cake\Http\ServerRequest
An instance of a Cake\Http\ServerRequest object that contains information about the current request. This object contains all the information about a request and several methods for reading additional information about the request.
protected Cake\Http\Response
An instance of a Response object that contains information about the impending response
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.8/class-Cake.View.Cell.html