ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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  }
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  return self::$instance;
58  }
59  return self::$instance = new ilLuceneAdvancedSearchSettings();
60  }
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 65 of file class.ilLuceneAdvancedSearchSettings.php.

References fields.

Referenced by ilLuceneAdvancedSearchActivationTableGUI\parse().

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

◆ read()

ilLuceneAdvancedSearchSettings::read ( )
private

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

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

Referenced by __construct().

88  {
89  foreach (ilLuceneAdvancedSearchFields::getFields() as $name => $translation) {
90  $this->fields[$name] = (bool) $this->storage->get($name, true);
91  }
92  }
$errors fields
Definition: imgupload.php:51
if($format !==null) $name
Definition: metadata.php:146
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 79 of file class.ilLuceneAdvancedSearchSettings.php.

References $name, and fields.

80  {
81  foreach ($this->fields as $name => $status) {
82  $this->storage->set($name, $status ? "1" : "0");
83  }
84  return true;
85  }
$errors fields
Definition: imgupload.php:51
if($format !==null) $name
Definition: metadata.php:146

◆ setActive()

ilLuceneAdvancedSearchSettings::setActive (   $a_field,
  $a_status 
)

set field active status

Parameters
boolactive

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

References fields.

75  {
76  $this->fields[$a_field] = (bool) $a_status;
77  }
$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: