ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilAdvancedMDSearch Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilAdvancedMDSearch:
+ Collaboration diagram for ilAdvancedMDSearch:

Public Member Functions

 __construct ($query_parser)
 
 setDefinition (ilAdvancedMDFieldDefinition $a_def)
 
 getDefinition ()
 
 setSearchElement (ilADTSearchBridge $a_adt)
 
 getSearchElement ()
 
 performSearch ()
 
- Public Member Functions inherited from ilAbstractSearch
 __construct (ilQueryParser $qp_obj)
 
 setFields (array $a_fields)
 
 getFields ()
 
 setFilter (array $a_filter)
 
 setIdFilter (array $a_id_filter)
 
 getIdFilter ()
 
 appendToFilter (string $a_type)
 
 getFilter ()
 
 __createLocateString ()
 
 __prepareFound (object $row)
 
 performSearch ()
 

Protected Attributes

ilAdvancedMDFieldDefinition $definition = null
 
ilADTSearchBridge $adt = null
 
- Protected Attributes inherited from ilAbstractSearch
ilDBInterface $db
 
ilQueryParser $query_parser
 
ilSearchResult $search_result
 
array $object_types
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

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

Definition at line 25 of file class.ilAdvancedMDSearch.php.

Constructor & Destructor Documentation

◆ __construct()

ilAdvancedMDSearch::__construct (   $query_parser)

Definition at line 30 of file class.ilAdvancedMDSearch.php.

References ilAbstractSearch\$query_parser, and ILIAS\GlobalScreen\Provider\__construct().

31  {
33  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getDefinition()

ilAdvancedMDSearch::getDefinition ( )

Definition at line 40 of file class.ilAdvancedMDSearch.php.

References $definition.

Referenced by performSearch().

41  {
42  return $this->definition;
43  }
ilAdvancedMDFieldDefinition $definition
+ Here is the caller graph for this function:

◆ getSearchElement()

ilAdvancedMDSearch::getSearchElement ( )

Definition at line 50 of file class.ilAdvancedMDSearch.php.

References $adt.

Referenced by performSearch().

51  {
52  return $this->adt;
53  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ performSearch()

ilAdvancedMDSearch::performSearch ( )

Definition at line 55 of file class.ilAdvancedMDSearch.php.

References ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), getDefinition(), ilAbstractSearch\getFilter(), getSearchElement(), and ilAbstractSearch\setFields().

56  {
57  $this->query_parser->parse();
58 
59  $locate = '';
60  $parser_value = $this->getDefinition()->getSearchQueryParserValue($this->getSearchElement());
61  if ($parser_value) {
62  $this->setFields(
63  [
64  $this->getSearchElement()->getSearchColumn()
65  ]
66  );
67  $locate = $this->__createLocateString();
68  }
69 
70  $search_type = strtolower(substr(get_class($this), 12, -6));
71 
72  $res_field = $this->getDefinition()->searchObjects(
73  $this->getSearchElement(),
74  $this->query_parser,
75  $this->getFilter(),
76  $locate,
77  $search_type
78  );
79 
80  if (is_array($res_field)) {
81  foreach ($res_field as $row) {
82  $found = is_array($row["found"] ?? null) ? $row["found"] : [];
83  $this->search_result->addEntry((int) $row["obj_id"], $row["type"], $found);
84  }
85  return $this->search_result;
86  }
87  return $this->search_result;
88  }
setFields(array $a_fields)
ilSearchResult $search_result
+ Here is the call graph for this function:

◆ setDefinition()

ilAdvancedMDSearch::setDefinition ( ilAdvancedMDFieldDefinition  $a_def)

Definition at line 35 of file class.ilAdvancedMDSearch.php.

35  : void
36  {
37  $this->definition = $a_def;
38  }

◆ setSearchElement()

ilAdvancedMDSearch::setSearchElement ( ilADTSearchBridge  $a_adt)

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

45  : void
46  {
47  $this->adt = $a_adt;
48  }

Field Documentation

◆ $adt

ilADTSearchBridge ilAdvancedMDSearch::$adt = null
protected

Definition at line 28 of file class.ilAdvancedMDSearch.php.

Referenced by getSearchElement().

◆ $definition

ilAdvancedMDFieldDefinition ilAdvancedMDSearch::$definition = null
protected

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

Referenced by getDefinition().


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