| Total Complexity | 3 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class TagFormFields |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * List of fields and default value for each field. |
||
| 9 | * |
||
| 10 | * @var array |
||
| 11 | */ |
||
| 12 | private static $_fieldList = [ |
||
| 13 | 'tag' => '', |
||
| 14 | 'title' => '', |
||
| 15 | 'subtitle' => '', |
||
| 16 | 'meta_description' => '', |
||
| 17 | 'post_image' => '', |
||
| 18 | 'layout' => 'blog.roll-layouts.home', |
||
| 19 | 'reverse_direction' => 0, |
||
| 20 | ]; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Get the tag form fields data. |
||
| 24 | * |
||
| 25 | * @return array |
||
| 26 | */ |
||
| 27 | public static function fields() |
||
| 28 | { |
||
| 29 | return self::$_fieldList; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Get data needed for tag forms. |
||
| 34 | * |
||
| 35 | * @param App/Models/Tag $tag |
||
|
|
|||
| 36 | * |
||
| 37 | * @return array |
||
| 38 | */ |
||
| 39 | public static function formData($tag = null) |
||
| 49 | } |
||
| 50 | } |
||
| 51 |