ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAccessibilityDocumentFormGUI Class Reference

Class ilAccessibilityDocumentFormGUI. More...

+ Inheritance diagram for ilAccessibilityDocumentFormGUI:
+ Collaboration diagram for ilAccessibilityDocumentFormGUI:

Public Member Functions

 __construct (ilAccessibilityDocument $document, ilHtmlPurifierInterface $documentPurifier, ilObjUser $actor, Filesystem $tmpFileSystem, FileUpload $fileUpload, string $formAction='', string $saveCommand='saveDocument', string $cancelCommand='showDocuments', bool $isEditable=false)
 
 setCheckInputCalled (bool $status)
 
 hasTranslatedError ()
 
 getTranslatedError ()
 
 hasTranslatedInfo ()
 
 getTranslatedInfo ()
 
 saveObject ()
 
- Public Member Functions inherited from ilPropertyFormGUI
 __construct ()
 
 executeCommand ()
 
 setTableWidth (string $a_width)
 
 getTableWidth ()
 
 setMode (string $a_mode)
 
 getMode ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setTitleIcon (string $a_titleicon)
 
 getTitleIcon ()
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setShowTopButtons (bool $a_val)
 
 getShowTopButtons ()
 
 setForceTopButtons (bool $a_val)
 
 getForceTopButtons ()
 
 addItem ($a_item)
 
 removeItemByPostVar (string $a_post_var, bool $a_remove_unused_headers=false)
 
 getItemByPostVar (string $a_post_var)
 
 setItems (array $a_items)
 
 getItems ()
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage (bool $a_val)
 
 getDisableStandardMessage ()
 
 getHideLabels ()
 
 setHideLabels (bool $a_value=true)
 
 setValuesByArray (array $a_values, bool $a_restrict_to_value_keys=false)
 
 setValuesByPost ()
 
 checkInput ()
 
 getInput (string $a_post_var, bool $ensureValidation=true)
 Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-POST variable, identified by the passed postvar. More...
 
 addCommandButton (string $a_cmd, string $a_text, string $a_id="")
 
 getCommandButtons ()
 
 clearCommandButtons ()
 
 getContent ()
 
 insertItem ( $item, bool $a_sub_item=false)
 
 addAsyncOnloadCode (string $code)
 
 getHTML ()
 
 getHTMLAsync ()
 
 getFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 
 moveFileUpload (string $a_target_directory, string $a_field, ?string $a_target_name=null, ?string $a_index=null, ?string $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 setFormAction (string $a_formaction)
 
 getFormAction ()
 
 setTarget (string $a_target)
 
 getTarget ()
 
 setMultipart (bool $a_multipart)
 
 getMultipart ()
 
 setId (string $a_id)
 
 getId ()
 
 setName (string $a_name)
 
 getName ()
 
 setKeepOpen (bool $a_keepopen)
 
 getKeepOpen ()
 
 setOpenTag (bool $a_open)
 
 getOpenTag ()
 
 setCloseTag (bool $a_val)
 
 getCloseTag ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 getHTML ()
 
 getContent ()
 

Protected Member Functions

 initForm ()
 
- Protected Member Functions inherited from ilPropertyFormGUI
 getRequestedPostVar ()
 
 getFileHash ()
 
 hideRequired (string $a_type)
 
 appendOnloadCode (string $html)
 
 rebuildUploadedFiles ()
 
 checkForRequiredField ()
 

Protected Attributes

ilAccessibilityDocument $document
 
ilObjUser $actor
 
FileUpload $fileUpload
 
Filesystem $tmpFileSystem
 
string $formAction
 
string $saveCommand
 
string $cancelCommand
 
bool $isEditable = false
 
string $translatedError = ''
 
string $translatedInfo = ''
 
ilHtmlPurifierInterface $documentPurifier
 
- Protected Attributes inherited from ilPropertyFormGUI
bool $required_text = false
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTemplate $tpl
 
ilObjUser $user = null
 
ilSetting $settings = null
 
string $mode = "std"
 
bool $check_input_called = false
 
bool $disable_standard_message = false
 
string $top_anchor = "il_form_top"
 
string $title = ''
 
string $titleicon = ""
 
string $description = ""
 
string $tbl_width = ""
 
bool $show_top_buttons = true
 
bool $hide_labels = false
 
bool $force_top_buttons = false
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
ilGlobalTemplateInterface $global_tpl = null
 
 $onload_code = []
 
- Protected Attributes inherited from ilFormGUI
string $formaction = ""
 
bool $multipart = false
 
bool $keepopen = false
 
bool $opentag = true
 
string $id = ''
 
string $name = ''
 
string $target = ''
 
bool $prevent_double_submission = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAccessibilityDocumentFormGUI::__construct ( ilAccessibilityDocument  $document,
ilHtmlPurifierInterface  $documentPurifier,
ilObjUser  $actor,
Filesystem  $tmpFileSystem,
FileUpload  $fileUpload,
string  $formAction = '',
string  $saveCommand = 'saveDocument',
string  $cancelCommand = 'showDocuments',
bool  $isEditable = false 
)

Definition at line 42 of file class.ilAccessibilityDocumentFormGUI.php.

52 {
53 $this->document = $document;
54 $this->documentPurifier = $documentPurifier;
55 $this->actor = $actor;
56 $this->tmpFileSystem = $tmpFileSystem;
57 $this->fileUpload = $fileUpload;
58 $this->formAction = $formAction;
59 $this->saveCommand = $saveCommand;
60 $this->cancelCommand = $cancelCommand;
61 $this->isEditable = $isEditable;
62
64
65 $this->initForm();
66 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $actor, $cancelCommand, $document, $documentPurifier, $fileUpload, $formAction, $isEditable, $saveCommand, $tmpFileSystem, ILIAS\GlobalScreen\Provider\__construct(), and initForm().

+ Here is the call graph for this function:

Member Function Documentation

◆ getTranslatedError()

ilAccessibilityDocumentFormGUI::getTranslatedError ( )

Definition at line 119 of file class.ilAccessibilityDocumentFormGUI.php.

119 : string
120 {
122 }

References $translatedError.

◆ getTranslatedInfo()

ilAccessibilityDocumentFormGUI::getTranslatedInfo ( )

Definition at line 129 of file class.ilAccessibilityDocumentFormGUI.php.

129 : string
130 {
132 }

References $translatedInfo.

◆ hasTranslatedError()

ilAccessibilityDocumentFormGUI::hasTranslatedError ( )

Definition at line 114 of file class.ilAccessibilityDocumentFormGUI.php.

114 : bool
115 {
116 return strlen($this->translatedError) > 0;
117 }

◆ hasTranslatedInfo()

ilAccessibilityDocumentFormGUI::hasTranslatedInfo ( )

Definition at line 124 of file class.ilAccessibilityDocumentFormGUI.php.

124 : bool
125 {
126 return strlen($this->translatedInfo) > 0;
127 }

◆ initForm()

ilAccessibilityDocumentFormGUI::initForm ( )
protected

Definition at line 73 of file class.ilAccessibilityDocumentFormGUI.php.

73 : void
74 {
75 if ($this->document->getId() > 0) {
76 $this->setTitle($this->lng->txt('acc_form_edit_doc_head'));
77 } else {
78 $this->setTitle($this->lng->txt('acc_form_new_doc_head'));
79 }
80
81 $this->setFormAction($this->formAction);
82
83 $title = new ilTextInputGUI($this->lng->txt('acc_form_document_title'), 'title');
84 $title->setInfo($this->lng->txt('acc_form_document_title_info'));
85 $title->setRequired(true);
86 $title->setDisabled(!$this->isEditable);
87 $title->setValue($this->document->getTitle());
88 $title->setMaxLength(255);
89 $this->addItem($title);
90
91 $documentLabel = $this->lng->txt('acc_form_document');
92 $documentByline = $this->lng->txt('acc_form_document_info');
93 if ($this->document->getId() > 0) {
94 $documentLabel = $this->lng->txt('acc_form_document_new');
95 $documentByline = $this->lng->txt('acc_form_document_new_info');
96 }
97
98 $document = new ilFileInputGUI($documentLabel, 'document');
99 $document->setInfo($documentByline);
100 if (!$this->document->getId()) {
101 $document->setRequired(true);
102 }
103 $document->setDisabled(!$this->isEditable);
104 $document->setSuffixes(['html', 'txt']);
105 $this->addItem($document);
106
107 if ($this->isEditable) {
108 $this->addCommandButton($this->saveCommand, $this->lng->txt('save'));
109 }
110
111 $this->addCommandButton($this->cancelCommand, $this->lng->txt('cancel'));
112 }
This class represents a file property in a property form.
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
This class represents a text property in a property form.

References $document, ilPropertyFormGUI\$title, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\lng(), ilFormGUI\setFormAction(), and ilPropertyFormGUI\setTitle().

Referenced by __construct().

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

◆ saveObject()

ilAccessibilityDocumentFormGUI::saveObject ( )

Definition at line 134 of file class.ilAccessibilityDocumentFormGUI.php.

134 : bool
135 {
136 if (!$this->fillObject()) {
137 $this->setValuesByPost();
138 return false;
139 }
140
141 $this->document->save();
142
143 return true;
144 }

References ilPropertyFormGUI\setValuesByPost().

+ Here is the call graph for this function:

◆ setCheckInputCalled()

ilAccessibilityDocumentFormGUI::setCheckInputCalled ( bool  $status)

Definition at line 68 of file class.ilAccessibilityDocumentFormGUI.php.

68 : void
69 {
70 $this->check_input_called = $status;
71 }

Field Documentation

◆ $actor

ilObjUser ilAccessibilityDocumentFormGUI::$actor
protected

Definition at line 31 of file class.ilAccessibilityDocumentFormGUI.php.

Referenced by __construct().

◆ $cancelCommand

string ilAccessibilityDocumentFormGUI::$cancelCommand
protected

Definition at line 36 of file class.ilAccessibilityDocumentFormGUI.php.

Referenced by __construct().

◆ $document

ilAccessibilityDocument ilAccessibilityDocumentFormGUI::$document
protected

Definition at line 30 of file class.ilAccessibilityDocumentFormGUI.php.

Referenced by __construct(), and initForm().

◆ $documentPurifier

ilHtmlPurifierInterface ilAccessibilityDocumentFormGUI::$documentPurifier
protected

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

Referenced by __construct().

◆ $fileUpload

FileUpload ilAccessibilityDocumentFormGUI::$fileUpload
protected

Definition at line 32 of file class.ilAccessibilityDocumentFormGUI.php.

Referenced by __construct().

◆ $formAction

string ilAccessibilityDocumentFormGUI::$formAction
protected

Definition at line 34 of file class.ilAccessibilityDocumentFormGUI.php.

Referenced by __construct().

◆ $isEditable

bool ilAccessibilityDocumentFormGUI::$isEditable = false
protected

Definition at line 37 of file class.ilAccessibilityDocumentFormGUI.php.

Referenced by __construct().

◆ $saveCommand

string ilAccessibilityDocumentFormGUI::$saveCommand
protected

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

Referenced by __construct().

◆ $tmpFileSystem

Filesystem ilAccessibilityDocumentFormGUI::$tmpFileSystem
protected

Definition at line 33 of file class.ilAccessibilityDocumentFormGUI.php.

Referenced by __construct().

◆ $translatedError

string ilAccessibilityDocumentFormGUI::$translatedError = ''
protected

Definition at line 38 of file class.ilAccessibilityDocumentFormGUI.php.

Referenced by getTranslatedError().

◆ $translatedInfo

string ilAccessibilityDocumentFormGUI::$translatedInfo = ''
protected

Definition at line 39 of file class.ilAccessibilityDocumentFormGUI.php.

Referenced by getTranslatedInfo().


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