cell()
cell(string $cell, array $data = array(), array $options = array()) : \Cake\View\Cell
Renders the given cell.
Example:
// Taxonomy\View\Cell\TagCloudCell::smallList()
$cell = $this->cell('Taxonomy.TagCloud::smallList', ['limit' => 10]);
// App\View\Cell\TagCloudCell::smallList()
$cell = $this->cell('TagCloud::smallList', ['limit' => 10]);
The display
action will be used by default when no action is provided:
// Taxonomy\View\Cell\TagCloudCell::display()
$cell = $this->cell('Taxonomy.TagCloud');
Cells are not rendered until they are echoed.
Parameters
string | $cell | You must indicate cell name, and optionally a cell action. e.g.: |
array | $data | Additional arguments for cell method. e.g.:
|
array | $options | Options for Cell's constructor |
Throws
- \Cake\View\Exception\MissingCellException
If Cell class was not found.
- \BadMethodCallException
If Cell class does not specified cell action.
Returns
\Cake\View\Cell —The cell instance