ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilOrgUnitAuthorityFormGUI.php
Go to the documentation of this file.
1 <?php
2 
4 
11 {
12 
16  protected $object;
17  const F_TITLE = 'title';
18  const F_DESCRIPTION = 'description';
19 
20 
21  protected function initFormElements()
22  {
23  $te = new ilTextInputGUI($this->txt(self::F_TITLE), self::F_TITLE);
24  $te->setRequired(true);
25  $this->addItem($te);
26 
27  $te = new ilTextAreaInputGUI($this->txt(self::F_DESCRIPTION), self::F_DESCRIPTION);
28  $this->addItem($te);
29 
30  $c = new ilCustomInputGUI($this->txt('authorities'));
31  $f = $this->parent_gui->dic()->ui()->factory();
32  $r = $this->parent_gui->dic()->ui()->renderer();
33  $modal = $f->modal()->roundtrip("Modal", $f->legacy(''))->withCloseWithKeyboard(false);
34  $button = $f->button()
35  ->shy($this->txt("open_authorities_modal"), '#')
36  ->withOnClick($modal->getShowSignal());
37 
38  $c->setHtml($r->render([ $button, $modal ]));
39  $this->addItem($c);
40  }
41 
42 
43  public function fillForm()
44  {
45  $array = array(
46  self::F_TITLE => $this->object->getTitle(),
47  self::F_DESCRIPTION => $this->object->getDescription(),
48  );
49 
50  $this->setValuesByArray($array);
51  }
52 
53 
59  public function fillObject()
60  {
61  if (!$this->checkInput()) {
62  return false;
63  }
64 
65  $this->object->setTitle($this->getInput(self::F_TITLE));
66  $this->object->setDescription($this->getInput(self::F_DESCRIPTION));
67 
68  return true;
69  }
70 }
addItem($a_item)
Add Item (Property, SectionHeader).
$r
Definition: example_031.php:79
This class represents a text property in a property form.
checkInput()
Check Post Input.
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
Create styles array
The data for the language used.
This class represents a custom property in a property form.
Create new PHPExcel object
obj_idprivate
This class represents a text area property in a property form.
Class ilOrgUnitAuthorityFormGUI.
setValuesByArray($a_values, $a_restrict_to_value_keys=false)
Set form values from an array.
fillObject()
returns whether checkinput was successful or not.