ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
class.ilDclFileFieldModel.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
25{
27
28 public function __construct(int $a_id = 0)
29 {
30 global $DIC;
31 $this->file_settings = $DIC->fileServiceSettings();
33 }
34
35 public function allowFilterInListView(): bool
36 {
37 return false;
38 }
39
40 public function getValidFieldProperties(): array
41 {
43 }
44
45 public function getSupportedExtensions(): array
46 {
47 $file_types = [];
48
49 foreach ($this->getExtensions() as $i => $type) {
50 if (
51 in_array($type, $this->file_settings->getWhiteListedSuffixes()) &&
52 !in_array($type, $this->file_settings->getBlackListedSuffixes())
53 ) {
54 $file_types[] = $type;
55 }
56 }
57
58 return $file_types;
59 }
60
61 protected function getExtensions(): array
62 {
64 if ($types === null) {
65 return [];
66 } else {
67 return explode(',', str_replace(' ', '', $types));
68 }
69 }
70}
@noinspection AutoloadingIssuesInspection
getValidFieldProperties()
Returns all valid properties for a field-type.
ilFileServicesSettings $file_settings
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26