Total Complexity | 2 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | class ContentAsset extends Asset { |
||
7 | |||
8 | public $name = 'Basic Content'; |
||
9 | public $shortname = 'Content'; |
||
10 | public $is_child = false; |
||
11 | |||
12 | public $value_equals = 'title'; |
||
13 | public $status_equals = 'status'; |
||
14 | |||
15 | public $properties = array( |
||
16 | 'title' => array( |
||
17 | 'name' => 'Title', |
||
18 | 'type' => self::STRING, |
||
19 | 'help' => 'Title of your article', |
||
20 | 'required' => true, |
||
21 | 'validation_messages' => 'A Title Is required' |
||
22 | ), |
||
23 | 'content' => array( |
||
24 | 'name' => 'Content', |
||
25 | 'type' => self::HTML |
||
26 | ), |
||
27 | 'status' => array( |
||
28 | 'name' => 'Published', |
||
29 | 'type' => self::DROPDOWN, |
||
30 | 'options' => ['published' => 'Published', 'unpublished' => 'Unpublished'], |
||
31 | 'published' => ['published'] |
||
32 | ), |
||
33 | ); |
||
34 | |||
35 | public static function about() { |
||
36 | return 'A basic content asset, allows for a title and some html content'; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * generate the route for this asset |
||
41 | */ |
||
42 | public static function route($record, $path = null){ |
||
46 | } |
||
47 | |||
50 |