Skip to content

Commit 2c06140

Browse files
authored
Merge pull request #7844 from sammyskills/doc-view-parser-typo
docs: fixed typo in view-parser
2 parents 411a9bb + afe45d2 commit 2c06140

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

user_guide_src/source/outgoing/view_parser.rst

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -426,20 +426,11 @@ Custom Filters
426426
--------------
427427

428428
You can easily create your own filters by editing **app/Config/View.php** and adding new entries to the
429-
``$filters`` array. Each key is the name of the filter is called by in the view, and its value is any valid PHP
429+
``$filters`` array. Each key is the name which the filter is called by in the view, and its value is any valid PHP
430430
callable:
431431

432432
.. literalinclude:: view_parser/012.php
433433

434-
PHP Native functions as Filters
435-
-------------------------------
436-
437-
You can use native php function as filters by editing **app/Config/View.php** and adding new entries to the
438-
``$filters`` array.Each key is the name of the native PHP function is called by in the view, and its value is any valid native PHP
439-
function prefixed with:
440-
441-
.. literalinclude:: view_parser/013.php
442-
443434
Parser Plugins
444435
==============
445436

user_guide_src/source/outgoing/view_parser/012.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
class View extends BaseView
88
{
99
public $filters = [
10-
'abs' => '\CodeIgniter\View\Filters::abs',
11-
'capitalize' => '\CodeIgniter\View\Filters::capitalize',
10+
'foo' => '\Some\Class::methodName',
11+
'str_repeat' => 'str_repeat', // native php function
1212
];
1313

1414
// ...
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
22

3-
return $parser->render('myview');
3+
return $parser->renderString('<ul><li>Item 1</li><li>Item 2</li></ul>');

0 commit comments

Comments
 (0)