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

Class ilBiblFieldFilterPresentationGUI. More...

+ Collaboration diagram for ilBiblFieldFilterPresentationGUI:

Public Member Functions

 __construct (\ilBiblFieldFilterInterface $filter, ilBiblFactoryFacadeInterface $facade)
 ilBiblFieldFilterPresentationGUI constructor. More...
 
 getFilterItem ()
 
 getFilter ()
 
 setFilter ($filter)
 

Protected Attributes

 $facade
 
 $filter
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilBiblFieldFilterPresentationGUI::__construct ( \ilBiblFieldFilterInterface  $filter,
ilBiblFactoryFacadeInterface  $facade 
)

ilBiblFieldFilterPresentationGUI constructor.

Parameters
\ilBiblFieldFilterInterface$filter
\ilBiblFactoryFacadeInterface$facade

Definition at line 27 of file class.ilBiblFieldFilterPresentationGUI.php.

References $facade, and $filter.

28  {
29  $this->facade = $facade;
30  $this->filter = $filter;
31  $this->lng()->loadLanguageModule('bibl');
32  }

Member Function Documentation

◆ getFilter()

ilBiblFieldFilterPresentationGUI::getFilter ( )
Returns

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

References $filter.

Referenced by getFilterItem().

+ Here is the caller graph for this function:

◆ getFilterItem()

ilBiblFieldFilterPresentationGUI::getFilterItem ( )
Returns
ilTableFilterItem

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

References $f, $filter, PHPMailer\PHPMailer\$options, ilBiblFieldFilterInterface\FILTER_TYPE_MULTI_SELECT_INPUT, ilBiblFieldFilterInterface\FILTER_TYPE_SELECT_INPUT, ilBiblFieldFilterInterface\FILTER_TYPE_TEXT_INPUT, and getFilter().

39  {
40  $field = $this->facade->fieldFactory()->findById($this->getFilter()->getFieldId());
41  $translated = $this->facade->translationFactory()->translate($field);
42 
43  $ilBiblFieldFilter = $this->getFilter();
44 
45  $obj_id = $this->facade->iliasObjId();
46  $f = $this->facade->attributeFactory();
47 
48  switch ($ilBiblFieldFilter->getFilterType()) {
50  $filter = new ilTextInputGUI($translated, $field->getIdentifier());
51  break;
53  $filter = new ilSelectInputGUI($translated, $field->getIdentifier());
54  $options[null] = $this->lng()->txt("please_select");
55  $options = $options + $f->getPossibleValuesForFieldAndObject($field, $obj_id);
56  $filter->setOptions($options);
57  break;
59  $filter = new ilMultiSelectInputGUI($translated, $field->getIdentifier());
60  $options = $f->getPossibleValuesForFieldAndObject($field, $obj_id);
61  $filter->setOptions($options);
62  break;
63  default:
64  throw new LogicException('no filter type used');
65  break;
66  }
67 
68  return $filter;
69  }
This class represents a selection list property in a property form.
This class represents a multi selection list property in a property form.
This class represents a text property in a property form.
+ Here is the call graph for this function:

◆ setFilter()

ilBiblFieldFilterPresentationGUI::setFilter (   $filter)
Parameters
\ilBiblFieldFilterInterface$filter

Definition at line 84 of file class.ilBiblFieldFilterPresentationGUI.php.

References $filter.

Field Documentation

◆ $facade

ilBiblFieldFilterPresentationGUI::$facade
protected

Definition at line 14 of file class.ilBiblFieldFilterPresentationGUI.php.

Referenced by __construct().

◆ $filter

ilBiblFieldFilterPresentationGUI::$filter
protected

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