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
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -195,7 +195,7 @@ Sometimes you need to perform additional logic for the view, but you don't want
195
195
196
196
use CodeIgniter\View\Cells\Cell;
197
197
198
-
class RecentPosts extends Cell
198
+
class RecentPostsCell extends Cell
199
199
{
200
200
protected $posts;
201
201
@@ -205,7 +205,7 @@ Sometimes you need to perform additional logic for the view, but you don't want
205
205
}
206
206
}
207
207
208
-
// app/Cells/recent_posts.php
208
+
// app/Cells/recent_posts_cell.php
209
209
<ul>
210
210
<?php foreach ($posts as $post): ?>
211
211
<li><?= $this->linkPost($post) ?></li>
@@ -223,7 +223,7 @@ If you need to perform additional logic before the view is rendered, you can imp
223
223
224
224
use CodeIgniter\View\Cells\Cell;
225
225
226
-
class RecentPosts extends Cell
226
+
class RecentPostsCell extends Cell
227
227
{
228
228
protected $posts;
229
229
@@ -236,12 +236,12 @@ If you need to perform additional logic before the view is rendered, you can imp
236
236
You can pass additional parameters to the ``mount()`` method by passing them as an array to the ``view_cell()`` helper function. Any of the parameters sent that match a parameter name of the ``mount`` method will be passed in.
237
237
::
238
238
239
-
// app/Cells/RecentPosts.php
239
+
// app/Cells/RecentPostsCell.php
240
240
namespace App\Cells;
241
241
242
242
use CodeIgniter\View\Cells\Cell;
243
243
244
-
class RecentPosts extends Cell
244
+
class RecentPostsCell extends Cell
245
245
{
246
246
protected $posts;
247
247
@@ -256,7 +256,7 @@ You can pass additional parameters to the ``mount()`` method by passing them as
0 commit comments