ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilDclFileFieldModel Class Reference

@noinspection AutoloadingIssuesInspection More...

+ Inheritance diagram for ilDclFileFieldModel:
+ Collaboration diagram for ilDclFileFieldModel:

Public Member Functions

 __construct (int $a_id=0)
 
 allowFilterInListView ()
 
 getValidFieldProperties ()
 Returns all valid properties for a field-type. More...
 
 getSupportedExtensions ()
 
- Public Member Functions inherited from ilDclBaseFieldModel
 __construct (int $a_id=0)
 
 setId ($a_id)
 Set field id. More...
 
 getId ()
 Get field id. More...
 
 setTableId (int $a_id)
 Set table id. More...
 
 getTableId ()
 Get table id. More...
 
 setTitle (string $a_title)
 Set title. More...
 
 getTitle ()
 Get title. More...
 
 setDescription (string $a_desc)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setDatatypeId (int $a_id)
 Set datatype id. More...
 
 getDatatypeId ()
 Get datatype_id. More...
 
 getDatatype ()
 
 getDatatypeTitle ()
 
 getPresentationTitle ()
 
 getPresentationDescription ()
 
 getStorageLocation ()
 Get storage location for the model. More...
 
 getExportable ()
 
 toArray ()
 
 isStandardField ()
 
 doRead ()
 
 buildFromDBRecord (array $rec)
 Builds model from db record. More...
 
 doCreate ()
 
 doUpdate ()
 
 updateProperties ()
 Update properties of this field in Database. More...
 
 doDelete ()
 Remove field and properties. More...
 
 getViewSettings ()
 
 getViewSetting (int $tableview_id)
 
 getOrder ()
 
 setOrder (int $order)
 
 hasProperty (string $key)
 Checks if a certain property for a field is set. More...
 
 getProperty (string $key)
 
 getPropertyInstance (string $key)
 
 setProperty (string $key, $value)
 
 getValidFieldProperties ()
 Returns all valid properties for a field-type. More...
 
 checkValidityFromForm (ilPropertyFormGUI &$form, ?int $record_id)
 
 checkValidity ($value, ?int $record_id)
 Check if input is valid. More...
 
 cloneStructure (int $original_id)
 
 afterClone (array $records)
 
 cloneProperties (ilDclBaseFieldModel $originalField)
 
 setExportable (bool $exportable)
 
 allowFilterInListView ()
 
 getRecordQuerySortObject (string $direction="asc", bool $sort_by_status=false)
 Returns a query-object for building the record-loader-sql-query. More...
 
 getRecordQueryFilterObject ( $filter_value="", ?ilDclBaseFieldModel $sort_field=null)
 Returns a query-object for building the record-loader-sql-query. More...
 
 getSortField ()
 Returns the sort-field id. More...
 
 hasNumericSorting ()
 Set to true, when the sorting should be handled numerical. More...
 
 checkFieldCreationInput (ilPropertyFormGUI $form)
 Checks input of specific fields befor saving. More...
 
 checkUniqueProp (ilPropertyFormGUI $form)
 
 checkUnique ($value, ?int $record_id)
 
 getStorageLocationOverride ()
 
 setStorageLocationOverride (?int $storage_location_override)
 
 fillHeaderExcel (ilExcel $worksheet, int &$row, int &$col)
 
 checkTitlesForImport (array &$titles, array &$import_fields)
 
 storePropertiesFromForm (ilPropertyFormGUI $form)
 called when saving the 'edit field' form More...
 
 fillPropertiesForm (ilPropertyFormGUI &$form)
 called to fill the 'edit field' form More...
 
 isConfirmationRequired (ilPropertyFormGUI $form)
 called by ilDclFieldEditGUI when updating field properties if you overwrite this method, remember to also overwrite getConfirmationGUI More...
 
 getConfirmationGUI (ilPropertyFormGUI $form)
 called by ilDclFieldEditGUI if isConfirmationRequired returns true More...
 

Protected Member Functions

 getExtensions ()
 
- Protected Member Functions inherited from ilDclBaseFieldModel
 loadDatatype ()
 Load datatype for model. More...
 
 loadTableFieldSetting ()
 loadTableFieldSetting More...
 
 addToTableViews ()
 create ilDclTableViewFieldSettings for this field in each tableview More...
 
 updateTableFieldSetting ()
 update exportable and fieldorder More...
 
 loadProperties ()
 Get all properties of a field. More...
 
 areEqual ($value_1, $value_2)
 
 normalizeValue (mixed $value)
 

Protected Attributes

ilFileServicesSettings $file_settings
 
- Protected Attributes inherited from ilDclBaseFieldModel
string $id = ""
 
int $table_id = 0
 
string $title = ""
 
string $description = ""
 
int $datatype_id = 0
 
int $order = null
 
array $property = []
 
bool $exportable = false
 
ilDclDatatype $datatype = null
 
int $storage_location_override = null
 With this property the datatype-storage-location can be overwritten. More...
 
ilDBInterface $db
 
ilLanguage $lng
 

Additional Inherited Members

- Static Public Member Functions inherited from ilDclBaseFieldModel
static _getTitleInvalidChars (bool $a_as_regex=true)
 All valid chars for filed titles. More...
 
static _getFieldIdByTitle (string $title, int $table_id)
 
- Data Fields inherited from ilDclBaseFieldModel
const PROP_LENGTH = "lenght"
 General properties. More...
 
const PROP_REGEX = "regex"
 
const PROP_REFERENCE = "table_id"
 
const PROP_URL = "url"
 
const PROP_REFERENCE_LINK = "reference_link"
 
const PROP_UNIQUE = "unique"
 
const PROP_WIDTH = "width"
 
const PROP_HEIGHT = "height"
 
const PROP_LEARNING_PROGRESS = "learning_progress"
 
const PROP_ILIAS_REFERENCE_LINK = "ILIAS_reference_link"
 
const PROP_N_REFERENCE = "multiple_selection"
 
const PROP_FORMULA_EXPRESSION = "expression"
 
const PROP_DISPLAY_COPY_LINK_ACTION_MENU = "display_action_menu"
 
const PROP_LINK_DETAIL_PAGE_TEXT = "link_detail_page_text"
 
const PROP_LINK_DETAIL_PAGE_MOB = "link_detail_page_mob"
 
const PROP_SUPPORTED_FILE_TYPES = "supported_file_types"
 
const PROP_PLUGIN_HOOK_NAME = "plugin_hook_name"
 
const EDIT_VIEW = 2
 
const EXPORTABLE_VIEW = 4
 

Detailed Description

@noinspection AutoloadingIssuesInspection

Definition at line 24 of file class.ilDclFileFieldModel.php.

Constructor & Destructor Documentation

◆ __construct()

ilDclFileFieldModel::__construct ( int  $a_id = 0)

Reimplemented from ilDclBaseFieldModel.

Reimplemented in ilDclMobFieldModel.

Definition at line 28 of file class.ilDclFileFieldModel.php.

29 {
30 global $DIC;
31 $this->file_settings = $DIC->fileServiceSettings();
33 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ allowFilterInListView()

ilDclFileFieldModel::allowFilterInListView ( )

Reimplemented from ilDclBaseFieldModel.

Definition at line 35 of file class.ilDclFileFieldModel.php.

35 : bool
36 {
37 return false;
38 }

◆ getExtensions()

ilDclFileFieldModel::getExtensions ( )
protected

Reimplemented in ilDclMobFieldModel.

Definition at line 61 of file class.ilDclFileFieldModel.php.

61 : array
62 {
64 if ($types === null) {
65 return [];
66 } else {
67 return explode(',', str_replace(' ', '', $types));
68 }
69 }

References ilDclBaseFieldModel\getProperty(), and ilDclBaseFieldModel\PROP_SUPPORTED_FILE_TYPES.

Referenced by getSupportedExtensions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSupportedExtensions()

ilDclFileFieldModel::getSupportedExtensions ( )

Definition at line 45 of file class.ilDclFileFieldModel.php.

45 : 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 }

References getExtensions().

+ Here is the call graph for this function:

◆ getValidFieldProperties()

ilDclFileFieldModel::getValidFieldProperties ( )

Returns all valid properties for a field-type.

Reimplemented from ilDclBaseFieldModel.

Reimplemented in ilDclMobFieldModel.

Definition at line 40 of file class.ilDclFileFieldModel.php.

40 : array
41 {
43 }

References ilDclBaseFieldModel\PROP_SUPPORTED_FILE_TYPES.

Field Documentation

◆ $file_settings

ilFileServicesSettings ilDclFileFieldModel::$file_settings
protected

Definition at line 26 of file class.ilDclFileFieldModel.php.


The documentation for this class was generated from the following file: