1 | <?php |
||
17 | class BaseBlock extends \ContentBlock { |
||
|
|||
18 | |||
19 | /** |
||
20 | * Default directory to upload your files. |
||
21 | * |
||
22 | * @var string |
||
23 | * @config |
||
24 | */ |
||
25 | protected static $upload_directory = 'Uploads/ContentBlocks'; |
||
26 | |||
27 | /** |
||
28 | * Include default styles (css) at frontend side? |
||
29 | * |
||
30 | * @var bool |
||
31 | */ |
||
32 | private static $default_styles = true; |
||
33 | |||
34 | /** |
||
35 | * Re-add (un)publish images. |
||
36 | * |
||
37 | * @return HTMLText |
||
38 | */ |
||
39 | public function isPublishedIcon() { |
||
50 | |||
51 | /** |
||
52 | * Renders this block with appropriate templates |
||
53 | * looks for templates that match BlockClassName_AreaName |
||
54 | * falls back to BlockClassName. |
||
55 | * |
||
56 | * Updates: if function will find the template at blocks/ directory, |
||
57 | * this will also render it. |
||
58 | * |
||
59 | * @return string |
||
60 | **/ |
||
61 | public function forTemplate() { |
||
80 | |||
81 | /** |
||
82 | * @return bool|string |
||
83 | */ |
||
84 | public function Link() { |
||
91 | |||
92 | /** |
||
93 | * @return string |
||
94 | */ |
||
95 | public function getUploadDirectory() { |
||
98 | |||
99 | /** |
||
100 | * @return string |
||
101 | */ |
||
102 | public function getBlockName() { |
||
105 | } |
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.