Skip to content

Commit 99451b8

Browse files
committed
docs: fix cell file names
For consistency.
1 parent d072835 commit 99451b8

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

user_guide_src/source/outgoing/view_cells.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ Sometimes you need to perform additional logic for the view, but you don't want
195195

196196
use CodeIgniter\View\Cells\Cell;
197197

198-
class RecentPosts extends Cell
198+
class RecentPostsCell extends Cell
199199
{
200200
protected $posts;
201201

@@ -205,7 +205,7 @@ Sometimes you need to perform additional logic for the view, but you don't want
205205
}
206206
}
207207

208-
// app/Cells/recent_posts.php
208+
// app/Cells/recent_posts_cell.php
209209
<ul>
210210
<?php foreach ($posts as $post): ?>
211211
<li><?= $this->linkPost($post) ?></li>
@@ -223,7 +223,7 @@ If you need to perform additional logic before the view is rendered, you can imp
223223

224224
use CodeIgniter\View\Cells\Cell;
225225

226-
class RecentPosts extends Cell
226+
class RecentPostsCell extends Cell
227227
{
228228
protected $posts;
229229

@@ -236,12 +236,12 @@ If you need to perform additional logic before the view is rendered, you can imp
236236
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.
237237
::
238238

239-
// app/Cells/RecentPosts.php
239+
// app/Cells/RecentPostsCell.php
240240
namespace App\Cells;
241241

242242
use CodeIgniter\View\Cells\Cell;
243243

244-
class RecentPosts extends Cell
244+
class RecentPostsCell extends Cell
245245
{
246246
protected $posts;
247247

@@ -256,7 +256,7 @@ You can pass additional parameters to the ``mount()`` method by passing them as
256256
}
257257

258258
// Called in main View:
259-
<?= view_cell('RecentPosts', ['categoryId' => 5]) ?>
259+
<?= view_cell('RecentPostsCell', ['categoryId' => 5]) ?>
260260

261261
************
262262
Cell Caching

0 commit comments

Comments
 (0)