ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ILIAS\Glossary\Search\SubitemPropertiesReader Class Reference
+ Inheritance diagram for ILIAS\Glossary\Search\SubitemPropertiesReader:
+ Collaboration diagram for ILIAS\Glossary\Search\SubitemPropertiesReader:

Public Member Functions

 init (Container $dic)
 
 getSubitemProperties (PropertiesFactory $factory, int $parent_ref_id, ID ... $subitem_ids)
 Order of the output should respect the order of the subitem_ids. More...
 
 init (Container $dic)
 
 getSubitemProperties (PropertiesFactory $factory, int $parent_ref_id, ID ... $subitem_ids)
 Order of the output should respect the order of the subitem_ids. More...
 

Static Public Member Functions

static type ()
 Type of the parent object. More...
 
static type ()
 Type of the parent object. More...
 

Protected Attributes

ilLanguage $lng
 
DataFactory $data_factory
 
StaticURL $static_url
 

Detailed Description

Definition at line 33 of file SubitemPropertiesReader.php.

Member Function Documentation

◆ getSubitemProperties()

ILIAS\Glossary\Search\SubitemPropertiesReader::getSubitemProperties ( PropertiesFactory  $factory,
int  $parent_ref_id,
ID ...  $subitem_ids 
)

Order of the output should respect the order of the subitem_ids.

Subitems that should not be shown in the search results should not be included in the output (read access on the parent object is already checked).

Returns
Properties[]

Implements ILIAS\Search\Presentation\Result\Subitem\PropertiesReader.

Definition at line 52 of file SubitemPropertiesReader.php.

56 : Generator {
57 foreach ($subitem_ids as $subitem_id) {
58 $link = $this->static_url->builder()->build(
59 'git',
60 $this->data_factory->refId((int) $subitem_id->id()),
61 [$parent_ref_id]
62 );
63 yield $factory->get(
64 $subitem_id,
65 ilGlossaryTerm::_lookGlossaryTerm((int) $subitem_id->id()),
66 $link,
67 false,
68 $this->lng->txt('cont_term')
69 );
70 }
71 }
static _lookGlossaryTerm(int $term_id)
get glossary term

References ilGlossaryTerm\_lookGlossaryTerm(), and ILIAS\Search\Presentation\Result\Subitem\PropertiesFactory\get().

+ Here is the call graph for this function:

◆ init()

ILIAS\Glossary\Search\SubitemPropertiesReader::init ( Container  $dic)

Implements ILIAS\Search\Presentation\Result\Subitem\PropertiesReader.

Definition at line 44 of file SubitemPropertiesReader.php.

44 : void
45 {
46 $this->lng = $dic->language();
47 $this->lng->loadLanguageModule('content');
48 $this->data_factory = new DataFactory();
49 $this->static_url = $dic['static_url'];
50 }
$dic
Definition: ltiresult.php:33

References $dic, ILIAS\DI\Container\language(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ type()

static ILIAS\Glossary\Search\SubitemPropertiesReader::type ( )
static

Type of the parent object.

Should do nothing but return a string, is called during setup.

Implements ILIAS\Search\Presentation\Result\Subitem\PropertiesReader.

Definition at line 39 of file SubitemPropertiesReader.php.

39 : string
40 {
41 return 'glo';
42 }

Field Documentation

◆ $data_factory

DataFactory ILIAS\Glossary\Search\SubitemPropertiesReader::$data_factory
protected

Definition at line 36 of file SubitemPropertiesReader.php.

◆ $lng

ilLanguage ILIAS\Glossary\Search\SubitemPropertiesReader::$lng
protected

Definition at line 35 of file SubitemPropertiesReader.php.

◆ $static_url

StaticURL ILIAS\Glossary\Search\SubitemPropertiesReader::$static_url
protected

Definition at line 37 of file SubitemPropertiesReader.php.


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