ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilMediaPoolSearch.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
31{
32 public function performSearch(): ilSearchResult
33 {
34 $this->setFields(array('title'));
35
36 $and = $this->__createAndCondition();
37 $locate = $this->__createLocateString();
38
39 $query = "SELECT mep_id,obj_id " .
40 $locate .
41 "FROM mep_tree JOIN mep_item ON child = obj_id " .
42 $and;
43
44 $res = $this->db->query($query);
45 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
46 $this->search_result->addEntry(
47 (int) $row->mep_id,
48 'mep',
49 $this->__prepareFound($row),
50 (int) $row->obj_id
51 );
52 }
54 }
55
57 {
58 $this->setFields(array('keyword'));
59
60 $and = $this->__createKeywordAndCondition();
61 $locate = $this->__createLocateString();
62
63
64 $query = "SELECT mep_id, child " .
65 $locate .
66 "FROM mep_item mi " .
67 "JOIN mep_tree ON mi.obj_id = child " .
68 "JOIN il_meta_keyword mk ON foreign_id = mk.obj_id " .
69 $and .
70 "AND obj_type = 'mob'";
71
72 $res = $this->db->query($query);
73 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
74 $this->search_result->addEntry(
75 (int) $row->mep_id,
76 'mep',
77 $this->__prepareFound($row),
78 (int) $row->child
79 );
80 }
82 }
83}
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...
$res
Definition: ltiservices.php:69