ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilExcCriteriaBool Class Reference

Class ilExcCriteriaBool. More...

+ Inheritance diagram for ilExcCriteriaBool:
+ Collaboration diagram for ilExcCriteriaBool:

Public Member Functions

 __construct ()
 Constructor. More...
 
 getType ()
 
 addToPeerReviewForm ($a_value=null)
 
 importFromPeerReviewForm ()
 
 hasValue ($a_value)
 
 getHTML ($a_value)
 
- Public Member Functions inherited from ilExcCriteria
 getTranslatedType ()
 
 getId ()
 
 getType ()
 
 setParent ($a_value)
 
 getParent ()
 
 setTitle ($a_value)
 
 getTitle ()
 
 setDescription ($a_value)
 
 getDescription ()
 
 setRequired ($a_value)
 
 isRequired ()
 
 setPosition ($a_value)
 
 getPosition ()
 
 importDefinition ($a_def, $a_def_json)
 
 save ()
 
 update ()
 
 delete ()
 
 cloneObject ($a_target_parent_id)
 
 initCustomForm (ilPropertyFormGUI $a_form)
 
 exportCustomForm (ilPropertyFormGUI $a_form)
 
 importCustomForm (ilPropertyFormGUI $a_form)
 
 setPeerReviewContext (ilExAssignment $a_ass, $a_giver_id, $a_peer_id, ilPropertyFormGUI $a_form=null)
 
 addToPeerReviewForm ($a_value=null)
 
 importFromPeerReviewForm ()
 
 updateFromAjax ()
 
 validate ($a_value)
 
 hasValue ($a_value)
 
 getHTML ($a_value)
 
 resetReview ()
 

Protected Attributes

 $lng
 
- Protected Attributes inherited from ilExcCriteria
 $db
 
 $id
 
 $parent
 
 $title
 
 $desc
 
 $required
 
 $pos
 
 $def
 
 $form
 
 $ass
 
 $giver_id
 
 $peer_id
 

Additional Inherited Members

- Static Public Member Functions inherited from ilExcCriteria
static getInstanceById ($a_id)
 
static getInstancesByParentId ($a_parent_id)
 
static getTypesMap ()
 
static getInstanceByType ($a_type)
 
static deleteByParent ($a_parent_id)
 
- Protected Member Functions inherited from ilExcCriteria
 __construct ()
 
 setId ($a_id)
 
 setDefinition (array $a_value=null)
 
 getDefinition ()
 
 importFromDB (array $a_row)
 
 getDBProperties ()
 
 getLastPosition ()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilExcCriteriaBool::__construct ( )

Constructor.

Reimplemented from ilExcCriteria.

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

25 {
26 global $DIC;
27
28 parent::__construct();
29 $this->lng = $DIC->language();
30 }
global $DIC
Definition: saml.php:7

References $DIC.

Member Function Documentation

◆ addToPeerReviewForm()

ilExcCriteriaBool::addToPeerReviewForm (   $a_value = null)

Reimplemented from ilExcCriteria.

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

41 {
43
44 if (!$this->isRequired()) {
45 $input = new ilCheckboxInputGUI($this->getTitle(), "prccc_bool_" . $this->getId());
46 $input->setInfo($this->getDescription());
47 $input->setRequired($this->isRequired());
48 $input->setChecked($a_value > 0);
49 } else {
50 $input = new ilSelectInputGUI($this->getTitle(), "prccc_bool_" . $this->getId());
51 $input->setInfo($this->getDescription());
52 $input->setRequired($this->isRequired());
53 $input->setValue($a_value);
54 $options = array();
55 if (!$a_value) {
56 $options[""] = $lng->txt("please_select");
57 }
58 $options[1] = $lng->txt("yes");
59 $options[-1] = $lng->txt("no");
60 $input->setOptions($options);
61 }
62 $this->form->addItem($input);
63 }
This class represents a checkbox property in a property form.
This class represents a selection list property in a property form.

References $input, $lng, PHPMailer\PHPMailer\$options, ilExcCriteria\getDescription(), ilExcCriteria\getId(), ilExcCriteria\getTitle(), and ilExcCriteria\isRequired().

+ Here is the call graph for this function:

◆ getHTML()

ilExcCriteriaBool::getHTML (   $a_value)

Reimplemented from ilExcCriteria.

Definition at line 75 of file class.ilExcCriteriaBool.php.

76 {
78
79 $caption = null;
80 if ($this->isRequired() && $a_value < 0) {
81 $caption = $lng->txt("no");
82 } elseif ($a_value == 1) {
83 $caption = $lng->txt("yes");
84 }
85 return $caption;
86 }

References $lng, and ilExcCriteria\isRequired().

+ Here is the call graph for this function:

◆ getType()

ilExcCriteriaBool::getType ( )

Reimplemented from ilExcCriteria.

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

33 {
34 return "bool";
35 }

◆ hasValue()

ilExcCriteriaBool::hasValue (   $a_value)

Reimplemented from ilExcCriteria.

Definition at line 70 of file class.ilExcCriteriaBool.php.

71 {
72 return (int) $a_value;
73 }

◆ importFromPeerReviewForm()

ilExcCriteriaBool::importFromPeerReviewForm ( )

Reimplemented from ilExcCriteria.

Definition at line 65 of file class.ilExcCriteriaBool.php.

66 {
67 return (int) $this->form->getInput("prccc_bool_" . $this->getId());
68 }

References ilExcCriteria\getId().

+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilExcCriteriaBool::$lng
protected

Definition at line 18 of file class.ilExcCriteriaBool.php.

Referenced by addToPeerReviewForm(), and getHTML().


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