You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user_guide_src/source/outgoing/view_cells.rst
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,15 @@ Controlled Cells
80
80
81
81
.. versionadded:: 4.3.0
82
82
83
-
Controlled Cells have two primary goals: to make it as fast as possible to build the cell, and provide additional logic and flexibility to your views, if they need it. The class must extend ``CodeIgniter\View\Cells\Cell``. They should have a view file in the same folder. By convention the class name should be PascalCase and the view should be the snake_cased version of the class name. So, for example, if you have a ``MyCell`` class, the view file should be ``my_cell.php``.
83
+
Controlled cells have two primary goals: to make it as fast as possible to build the cell, and provide additional logic and
84
+
flexibility to your views, if they need it. The class must extend ``CodeIgniter\View\Cells\Cell``. They should have a view file
85
+
in the same folder. By convention, the class name should be in PascalCase suffixed with ``Cell`` and the view should be
86
+
the snake_cased version of the class name, without the suffix. For example, if you have a ``MyCell`` class, the view file
87
+
should be ``my.php``.
88
+
89
+
.. note:: Prior to v4.3.5, the generated view file ends with ``_cell.php``. This was deemed incorrect and corrected accordingly.
90
+
For backward compatibility, existing view files ending with ``_cell.php`` will still be located and loaded. However, it is
91
+
recommended to update the filenames to remove the trailing ``_cell``.
84
92
85
93
Creating a Controlled Cell
86
94
==========================
@@ -99,7 +107,7 @@ At the most basic level, all you need to implement within the class are public p
0 commit comments