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
|`string $separator = '-'`| The separator character |
925
+
|`bool $lowercase = true`| Convert the result to lowercase |
926
+
|`array\|string $replace = []`| Characters/strings to replace with a space |
927
+
928
+
```php
929
+
<?php
930
+
931
+
use Phalcon\Html\Escaper;
932
+
use Phalcon\Html\Helper\FriendlyTitle;
933
+
934
+
$escaper = new Escaper();
935
+
$helper = new FriendlyTitle($escaper);
936
+
937
+
echo $helper('Hello World');
938
+
// hello-world
939
+
940
+
echo $helper('Hello World', '_');
941
+
// hello_world
942
+
943
+
echo $helper('Hello World', '-', false);
944
+
// Hello-World
945
+
946
+
echo $helper('Hello & World');
947
+
// hello-and-world
948
+
949
+
echo $helper('Héllo Wörld');
950
+
// hello-world
951
+
952
+
echo $helper('Hello/World', '-', true, ['/']);
953
+
// hello-world
954
+
```
955
+
916
956
### `img`
917
957
[Phalcon\Html\Helper\Img][html-helper-img] creates a `<img>` tag.
918
958
@@ -1955,6 +1995,51 @@ echo $result;
1955
1995
// </ol>
1956
1996
```
1957
1997
1998
+
### `preload`
1999
+
[Phalcon\Html\Helper\Preload][html-helper-preload] creates a `<link rel="preload">` tag for resource hinting. If a `ResponseInterface` is injected into `TagFactory`, it also sets the HTTP `Link:` header.
0 commit comments