Skip to content

Commit f057c17

Browse files
committed
docs: add section "Simple and Controlled Cells"
1 parent 28cfc36 commit f057c17

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

user_guide_src/source/outgoing/view_cells.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,20 @@ View Cells
44

55
Many applications have small view fragments that can be repeated from page to page, or in different places on the pages. These are often help boxes, navigation controls, ads, login forms, etc. CodeIgniter lets you encapsulate the logic for these presentation blocks within View Cells. They are basically mini-views that can be included in other views. They can have logic built in to handle any cell-specific display logic. They can be used to make your views more readable and maintainable by separating the logic for each cell into its own class.
66

7-
CodeIgniter supports two types of View Cells: simple and controlled. Simple View Cells can be generated from any class and method of your choice and does not have to follow any rules, except that it must return a string. Controlled View Cells must be generated from a class that extends ``Codeigniter\View\Cells\Cell`` class which provides additional capability making your View Cells more flexible and faster to use.
8-
97
.. contents::
108
:local:
119
:depth: 2
1210

11+
***************************
12+
Simple and Controlled Cells
13+
***************************
14+
15+
CodeIgniter supports two types of View Cells: simple and controlled.
16+
17+
**Simple View Cells** can be generated from any class and method of your choice and does not have to follow any rules, except that it must return a string.
18+
19+
**Controlled View Cells** must be generated from a class that extends ``Codeigniter\View\Cells\Cell`` class which provides additional capability making your View Cells more flexible and faster to use.
20+
1321
.. _app-cells:
1422

1523
*******************

0 commit comments

Comments
 (0)