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

En/disable single lom/advanced meta data fields. More...

+ Collaboration diagram for ilLuceneAdvancedSearchSettings:

Public Member Functions

 isActive ($a_field)
 check if field is active More...
 
 setActive ($a_field, $a_status)
 set field active status More...
 
 save ()
 

Static Public Member Functions

static getInstance ()
 

Protected Attributes

 $storage = null
 

Private Member Functions

 __construct ()
 Constructor. More...
 
 read ()
 

Private Attributes

 $fields = array()
 

Static Private Attributes

static $instance = null
 

Detailed Description

En/disable single lom/advanced meta data fields.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilLuceneAdvancedSearchSettings::__construct ( )
private

Constructor.

Definition at line 46 of file class.ilLuceneAdvancedSearchSettings.php.

References $DIC, $ilSetting, and read().

47  {
48  global $DIC;
49 
50  $ilSetting = $DIC['ilSetting'];
51 
52  $this->storage = new ilSetting('lucene_adv_search');
53  $this->read();
54  }
global $DIC
Definition: saml.php:7
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

Member Function Documentation

◆ getInstance()

static ilLuceneAdvancedSearchSettings::getInstance ( )
static

Definition at line 56 of file class.ilLuceneAdvancedSearchSettings.php.

Referenced by ilLuceneAdvancedSearchFields\__construct(), ilObjSearchSettingsGUI\advancedLuceneSettingsObject(), and ilObjSearchSettingsGUI\saveAdvancedLuceneSettingsObject().

57  {
58  if (isset(self::$instance) and self::$instance != null) {
59  return self::$instance;
60  }
61  return self::$instance = new ilLuceneAdvancedSearchSettings();
62  }
En/disable single lom/advanced meta data fields.
+ Here is the caller graph for this function:

◆ isActive()

ilLuceneAdvancedSearchSettings::isActive (   $a_field)

check if field is active

Definition at line 67 of file class.ilLuceneAdvancedSearchSettings.php.

References fields.

Referenced by ilLuceneAdvancedSearchActivationTableGUI\parse().

68  {
69  return $this->fields[$a_field] ? $this->fields[$a_field] : false;
70  }
$errors fields
Definition: imgupload.php:51
+ Here is the caller graph for this function:

◆ read()

ilLuceneAdvancedSearchSettings::read ( )
private

Definition at line 89 of file class.ilLuceneAdvancedSearchSettings.php.

References $name, fields, and ilLuceneAdvancedSearchFields\getFields().

Referenced by __construct().

90  {
91  foreach (ilLuceneAdvancedSearchFields::getFields() as $name => $translation) {
92  $this->fields[$name] = (bool) $this->storage->get($name, true);
93  }
94  }
$errors fields
Definition: imgupload.php:51
static getFields()
Return an array of all meta data fields.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilLuceneAdvancedSearchSettings::save ( )

Definition at line 81 of file class.ilLuceneAdvancedSearchSettings.php.

References $name, and fields.

82  {
83  foreach ($this->fields as $name => $status) {
84  $this->storage->set($name, $status ? "1" : "0");
85  }
86  return true;
87  }
$errors fields
Definition: imgupload.php:51

◆ setActive()

ilLuceneAdvancedSearchSettings::setActive (   $a_field,
  $a_status 
)

set field active status

Parameters
boolactive

Definition at line 76 of file class.ilLuceneAdvancedSearchSettings.php.

References fields.

77  {
78  $this->fields[$a_field] = (bool) $a_status;
79  }
$errors fields
Definition: imgupload.php:51

Field Documentation

◆ $fields

ilLuceneAdvancedSearchSettings::$fields = array()
private

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

◆ $instance

ilLuceneAdvancedSearchSettings::$instance = null
staticprivate

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

◆ $storage

ilLuceneAdvancedSearchSettings::$storage = null
protected

Definition at line 41 of file class.ilLuceneAdvancedSearchSettings.php.


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