| Total Complexity | 3 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class ItemAsset extends Asset { |
||
| 7 | |||
| 8 | public $name = 'Article'; |
||
| 9 | public $shortname = 'article'; |
||
| 10 | public $value_equals = 'title'; |
||
| 11 | public $status_equals = 'published'; |
||
| 12 | |||
| 13 | |||
| 14 | public $properties = array( |
||
| 15 | 'title' => array( |
||
| 16 | 'name' => 'Heading', |
||
| 17 | 'type' => self::STRING, |
||
| 18 | 'required' => true |
||
| 19 | ), |
||
| 20 | 'intro' => array( |
||
| 21 | 'name' => 'Intro', |
||
| 22 | 'type' => self::TEXT |
||
| 23 | ), |
||
| 24 | 'content' => array( |
||
| 25 | 'name' => 'Full Body', |
||
| 26 | 'type' => self::HTML |
||
| 27 | ), |
||
| 28 | 'author' => array( |
||
| 29 | 'name' => 'Author', |
||
| 30 | 'type' => self::IDENTITY |
||
| 31 | ), |
||
| 32 | 'published' => array( |
||
| 33 | 'name' => 'Published', |
||
| 34 | 'type' => self::DROPDOWN, |
||
| 35 | 'options' => ['draft' => 'Draft', 'published' => 'Published', 'aarchive' => 'Archived'], |
||
| 36 | 'published' => ['published'] |
||
| 37 | ), |
||
| 38 | |||
| 39 | ); |
||
| 40 | |||
| 41 | public static function about() { |
||
| 43 | } |
||
| 44 | |||
| 45 | |||
| 46 | |||
| 47 | /** |
||
| 48 | * generate the route for this asset |
||
| 49 | */ |
||
| 50 | public static function route($record, $path = null){ |
||
| 57 |