ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 $ilSetting, and read().

47  {
48  global $ilSetting;
49 
50  $this->storage = new ilSetting('lucene_adv_search');
51  $this->read();
52  }
ILIAS Setting Class.
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 54 of file class.ilLuceneAdvancedSearchSettings.php.

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

55  {
56  if(isset(self::$instance) and self::$instance != null)
57  {
58  return self::$instance;
59  }
60  return self::$instance = new ilLuceneAdvancedSearchSettings();
61  }
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 66 of file class.ilLuceneAdvancedSearchSettings.php.

References fields.

Referenced by ilLuceneAdvancedSearchActivationTableGUI\parse().

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

◆ read()

ilLuceneAdvancedSearchSettings::read ( )
private

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

References fields, and ilLuceneAdvancedSearchFields\getFields().

Referenced by __construct().

90  {
91  foreach(ilLuceneAdvancedSearchFields::getFields() as $name => $translation)
92  {
93  $this->fields[$name] = (bool) $this->storage->get($name,true);
94  }
95  }
$errors fields
Definition: imgupload.php:52
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 80 of file class.ilLuceneAdvancedSearchSettings.php.

References fields.

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

◆ setActive()

ilLuceneAdvancedSearchSettings::setActive (   $a_field,
  $a_status 
)

set field active status

Parameters
boolactive

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

References fields.

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

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: