1 | <?php |
||
5 | class MarkdownTextareaField extends TextareaField |
||
|
|||
6 | { |
||
7 | /** |
||
8 | * Define the actions allowed on this field |
||
9 | * @var array |
||
10 | */ |
||
11 | private static $allowed_actions = array( |
||
12 | 'preview', |
||
13 | 'parse' |
||
14 | ); |
||
15 | |||
16 | /** |
||
17 | * @var int Visible number of text lines. |
||
18 | * Default on TextareaField is too small |
||
19 | */ |
||
20 | protected $rows = 15; |
||
21 | |||
22 | /** |
||
23 | * Toggle rendering markdown with extra syntax enabled. |
||
24 | * @link http://michelf.ca/projects/php-markdown/extra |
||
25 | * @var boolean |
||
26 | */ |
||
27 | protected $enable_extra = false; |
||
28 | |||
29 | /** |
||
30 | * Returns the field holder used by templates |
||
31 | * |
||
32 | * @param array $properties |
||
33 | * @return string HTML to be used |
||
34 | */ |
||
35 | public function FieldHolder($properties = array()) |
||
48 | |||
49 | /** |
||
50 | * Turn on extra syntax support |
||
51 | * @return MarkdownTextareaField |
||
52 | */ |
||
53 | public function enableExtra() |
||
58 | |||
59 | /** |
||
60 | * Body for the preview iframe with just the typography styles included |
||
61 | * @return string html |
||
62 | */ |
||
63 | public function preview() |
||
70 | |||
71 | /** |
||
72 | * Parse markdown into html |
||
73 | * @return string html |
||
74 | */ |
||
75 | public function parse() |
||
81 | |||
82 | /** |
||
83 | * Get buttons described in buttons.yml and wrap them in ViewableData |
||
84 | * @return ArrayList list of buttons and theyr configurations |
||
85 | */ |
||
86 | public function ToolbarButtons() |
||
96 | } |
||
97 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.