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

Lucene path filter. More...

+ Inheritance diagram for ilLucenePathFilter:
+ Collaboration diagram for ilLucenePathFilter:

Public Member Functions

 __construct ($a_root)
 Constructor. More...
 
 filter ($a_ref_id)
 Return whether a object reference is valid or not. More...
 
 filter ($a_ref_id)
 Return whether a object reference is valid or not. More...
 

Protected Member Functions

 init ()
 Read valid reference ids. More...
 

Protected Attributes

 $root = ROOT_FOLDER_ID
 
 $subnodes = array()
 

Detailed Description

Lucene path filter.

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

Definition at line 34 of file class.ilLucenePathFilter.php.

Constructor & Destructor Documentation

◆ __construct()

ilLucenePathFilter::__construct (   $a_root)

Constructor.

Parameters
int$a_rootroot id
Returns

Definition at line 45 of file class.ilLucenePathFilter.php.

46 {
47 $this->root = $a_root;
48 //$this->init();
49 }

Member Function Documentation

◆ filter()

ilLucenePathFilter::filter (   $a_ref_id)

Return whether a object reference is valid or not.

Parameters
int$a_ref_idreference id of object in question
Returns
boolean

Implements ilLuceneResultFilter.

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

57 {
58 global $DIC;
59
60 $tree = $DIC['tree'];
61
62 if ($this->root == ROOT_FOLDER_ID) {
63 return true;
64 }
65 if ($this->root == $a_ref_id) {
66 return true;
67 }
68 return $tree->isGrandChild($this->root, $a_ref_id);
69 }
global $DIC
Definition: saml.php:7

References $DIC, and $tree.

◆ init()

ilLucenePathFilter::init ( )
protected

Read valid reference ids.

Returns

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

76 {
77 global $DIC;
78
79 $tree = $DIC['tree'];
80
81 if ($this->root == ROOT_FOLDER_ID) {
82 $this->subnodes = array();
83 } else {
84 $node = $tree->getNodeData($this->root);
85 $this->subnodes = $tree->getSubTree($node, false);
86 }
87 }

References $DIC, and $tree.

Field Documentation

◆ $root

ilLucenePathFilter::$root = ROOT_FOLDER_ID
protected

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

◆ $subnodes

ilLucenePathFilter::$subnodes = array()
protected

Definition at line 37 of file class.ilLucenePathFilter.php.


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