Skip to content

Commit c576964

Browse files
committed
docs: remove ; at the end in view sample code
1 parent b7ea08a commit c576964

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

user_guide_src/source/outgoing/view_cells.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ Calling a View Cell
1919
No matter which type of View Cell you are using, you can call it from any view by using the ``view_cell()`` helper method. The first parameter is the name of the class and method to call, and the second parameter is an array of parameters to pass to the method. The method must return a string, which will be inserted into the view where the ``view_cell()`` method was called.
2020
::
2121

22-
<?= view_cell('App\Cells\MyClass::myMethod', ['param1' => 'value1', 'param2' => 'value2']); ?>
22+
<?= view_cell('App\Cells\MyClass::myMethod', ['param1' => 'value1', 'param2' => 'value2']) ?>
2323

2424
If you do not include the full namespace for the class, it will assume in can be found in the ``App\Cells`` namespace. So, the following example would attempt to find the ``MyClass`` class in ``app/Cells/MyClass.php``. If it is not found there, all namespaces will be scanned until it is found, searching within a ``Cells`` subdirectory of each namespace.
2525
::
2626

27-
<?= view_cell('MyClass::myMethod', ['param1' => 'value1', 'param2' => 'value2']); ?>
27+
<?= view_cell('MyClass::myMethod', ['param1' => 'value1', 'param2' => 'value2']) ?>
2828

2929
.. note:: Namespace omission is available since v4.3.0 and later.
3030

3131
You can also pass the parameters along as a key/value string:
3232
::
3333

34-
<?= view_cell('MyClass::myMethod', 'param1=value1, param2=value2'); ?>
34+
<?= view_cell('MyClass::myMethod', 'param1=value1, param2=value2') ?>
3535

3636
************
3737
Simple Cells
@@ -53,7 +53,7 @@ Simple Cells are classes that return a string from the chosen method. An example
5353
You would call it from within a view like:
5454
::
5555

56-
<?= view_cell('AlertMessage::show', ['type' => 'success', 'message' => 'The user has been updated.']); ?>
56+
<?= view_cell('AlertMessage::show', ['type' => 'success', 'message' => 'The user has been updated.']) ?>
5757

5858
Additionally, you can use parameter names that match the parameter variables in the method for better readability.
5959
When you use it this way, all of the parameters must always be specified in the view cell call::
@@ -209,7 +209,7 @@ Sometimes you need to perform additional logic for the view, but you don't want
209209
<ul>
210210
<?php foreach ($posts as $post): ?>
211211
<li><?= $this->linkPost($post) ?></li>
212-
<?php endforeach; ?>
212+
<?php endforeach ?>
213213
</ul>
214214

215215
Performing Setup Logic
@@ -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('RecentPosts', ['categoryId' => 5]) ?>
260260

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

0 commit comments

Comments
 (0)