mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Update 09_Casting.md
This commit is contained in:
parent
1c1298e062
commit
3a49759c0f
@ -17,7 +17,7 @@ output the result of the [DBHtmlText::FirstParagraph()](api:SilverStripe\ORM\Fie
|
||||
|
||||
```ss
|
||||
$Content.FirstParagraph
|
||||
<!-- returns the result of HtmlText::FirstParagragh() -->
|
||||
<!-- returns the result of DBHtmlText::FirstParagragh() -->
|
||||
|
||||
$LastEdited.Format("d/m/Y")
|
||||
<!-- returns the result of DBDatetime::Format("d/m/Y") -->
|
||||
@ -72,7 +72,7 @@ $Me
|
||||
## Casting
|
||||
|
||||
Methods which return data to the template should either return an explicit object instance describing the type of
|
||||
content that method sends back, or, provide a type in the `$casting` array for the object. When rendering that method
|
||||
content that method sends back, or provide a type in the `$casting` array for the object. When rendering that method
|
||||
to a template, SilverStripe will ensure that the object is wrapped in the correct type and values are safely escaped.
|
||||
|
||||
```php
|
||||
|
Loading…
x
Reference in New Issue
Block a user