ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilWikiContentSearch Class Reference

Class ilWikiContentSearch. More...

+ Inheritance diagram for ilWikiContentSearch:
+ Collaboration diagram for ilWikiContentSearch:

Public Member Functions

 performSearch ()
 
 __createInStatement ()
 
- 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 ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilAbstractSearch
 getValidObjectTypes (ilObjectDefinition $object_definition)
 
- Protected Attributes inherited from ilAbstractSearch
ilDBInterface $db
 
ilQueryParser $query_parser
 
ilSearchResult $search_result
 
array $object_types = []
 

Detailed Description

Class ilWikiContentSearch.

Abstract class for wiki content.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

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

Member Function Documentation

◆ __createInStatement()

ilWikiContentSearch::__createInStatement ( )

Definition at line 60 of file class.ilWikiContentSearch.php.

References ilAbstractSearch\getFilter(), and ilAbstractSearch\getIdFilter().

Referenced by performSearch().

60  : string
61  {
62  if (!$this->getFilter() and !$this->getIdFilter()) {
63  return '';
64  }
65 
66 
67  $in = '';
68  if ($this->getFilter()) {
69  $type = "('";
70  $type .= implode("','", $this->getFilter());
71  $type .= "')";
72 
73  $in = " AND parent_type IN " . $type . ' ';
74  }
75  if ($this->getIdFilter()) {
76  $in .= ' AND ';
77  $in .= $this->db->in('il_wiki_page.wiki_id', $this->getIdFilter(), false, 'integer');
78  }
79 
80  return $in;
81  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ performSearch()

ilWikiContentSearch::performSearch ( )

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

References $res, ilAbstractSearch\$search_result, __createInStatement(), ilAbstractSearch\__createLocateString(), ilDBConstants\FETCHMODE_OBJECT, ILIAS\Repository\int(), and ilAbstractSearch\setFields().

31  {
32  $this->setFields(array('content'));
33 
34  $in = $this->__createInStatement();
35  $where = $this->__createWhereCondition();
36  $locate = $this->__createLocateString();
37 
38  $query = "SELECT page_id,parent_id,parent_type " .
39  $locate .
40  "FROM page_object, il_wiki_page " .
41  $where .
42  "AND il_wiki_page.id = page_object.page_id " .
43  $in;
44 
45  $res = $this->db->query($query);
46  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
47  $this->search_result->addEntry(
48  (int) $row->parent_id,
49  $row->parent_type,
50  $this->__prepareFound($row),
51  (int) $row->page_id
52  );
53  }
54  return $this->search_result;
55  }
$res
Definition: ltiservices.php:66
setFields(array $a_fields)
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

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