mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed conventions in shortcode docs
This commit is contained in:
parent
306d3b0c7e
commit
e0f4bd6113
@ -36,8 +36,8 @@ ensure they're casted correctly:
|
||||
|
||||
:::php
|
||||
class MyObject extends DataObject {
|
||||
static $db = array('Content' => 'HTMLText');
|
||||
static $casting = array('ContentHighlighted' => 'HTMLText');
|
||||
private static $db = array('Content' => 'HTMLText');
|
||||
private static $casting = array('ContentHighlighted' => 'HTMLText');
|
||||
public function ContentHighlighted($term) {
|
||||
return str_replace($term, "<em>$term</em>", $this->Content);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user