Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 991
Zeile 1... Zeile -...
1
capitalize {#language.modifier.capitalize}
-
 
2
==========
1
# capitalize
Zeile 3... Zeile 2...
3
 
2
 
4
This is used to capitalize the first letter of all words in a variable.
3
This is used to capitalize the first letter of all words in a variable.
5
This is similar to the PHP [`ucwords()`](&url.php-manual;ucwords)
4
This is similar to the PHP [`ucwords()`](https://www.php.net/ucwords)
Zeile -... Zeile 5...
-
 
5
function.
-
 
6
 
6
function.
7
## Basic usage
7
 
-
 
8
   Parameter Position    Type     Required   Default  Description
-
 
9
  -------------------- --------- ---------- --------- -----------------------------------------------------------------------------------------------------------
-
 
-
 
8
```smarty
Zeile -... Zeile 9...
-
 
9
{$myVar|capitalize}
Zeile 10... Zeile -...
10
           1            boolean      No       FALSE   This determines whether or not words with digits will be uppercased
-
 
-
 
10
```
-
 
11
 
-
 
12
## Parameters
-
 
13
 
Zeile 11... Zeile -...
11
           2            boolean      No       FALSE   This determines whether or not Capital letters within words should be lowercased, e.g. \"aAa\" to \"Aaa\"
-
 
Zeile -... Zeile 14...
-
 
14
| Parameter | Type    | Required | Description                                                                                           |
-
 
15
|-----------|---------|----------|-------------------------------------------------------------------------------------------------------|
12
 
16
| 1         | boolean | No       | This determines whether or not words with digits will be uppercased                                   |
-
 
17
| 2         | boolean | No       | This determines whether or not Capital letters within words should be lowercased, e.g. "aAa" to "Aaa" |
-
 
18
 
-
 
19
 
Zeile -... Zeile 20...
-
 
20
## Examples
Zeile 13... Zeile 21...
13
 
21
 
Zeile 14... Zeile 22...
14
    <?php
22
```php
15
 
23
<?php
16
    $smarty->assign('articleTitle', 'next x-men film, x3, delayed.');
24
 
17
 
25
    $smarty->assign('articleTitle', 'next x-men film, x3, delayed.');
18
    ?>
26
 
Zeile 19... Zeile 27...
19
 
27
```
Zeile 20... Zeile 28...
20
       
28
       
21
 
29
 
22
Where the template is:
30
Where the template is:
23
 
31
 
24
 
32
```smarty
Zeile 25... Zeile 33...
25
    {$articleTitle}
33
    {$articleTitle}
26
    {$articleTitle|capitalize}
34
    {$articleTitle|capitalize}