| Total Complexity | 4 |
| Total Lines | 74 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class ElementFileList extends BaseElement |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private static $icon = 'font-icon-block-file-list'; |
||
|
|
|||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private static $singular_name = 'File List Element'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | private static $plural_name = 'File List Elements'; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | private static $table_name = 'ElementFileList'; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var array |
||
| 33 | */ |
||
| 34 | private static $has_many = [ |
||
| 35 | 'Files' => FileListObject::class, |
||
| 36 | ]; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @var array |
||
| 40 | */ |
||
| 41 | private static $owns = [ |
||
| 42 | 'Files', |
||
| 43 | ]; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Set to false to prevent an in-line edit form from showing in an elemental area. Instead the element will be |
||
| 47 | * clickable and a GridFieldDetailForm will be used. |
||
| 48 | * |
||
| 49 | * @config |
||
| 50 | * @var bool |
||
| 51 | */ |
||
| 52 | private static $inline_editable = false; |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return DBHTMLText |
||
| 56 | */ |
||
| 57 | public function getSummary() |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return array |
||
| 69 | */ |
||
| 70 | protected function provideBlockSchema() |
||
| 71 | { |
||
| 72 | $blockSchema = parent::provideBlockSchema(); |
||
| 73 | $blockSchema['content'] = $this->getSummary(); |
||
| 74 | return $blockSchema; |
||
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return string |
||
| 79 | */ |
||
| 80 | public function getType() |
||
| 83 | } |
||
| 84 | } |
||
| 85 |