ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ILIAS\WebResource\Search\SubitemPropertiesReader Class Reference
+ Inheritance diagram for ILIAS\WebResource\Search\SubitemPropertiesReader:
+ Collaboration diagram for ILIAS\WebResource\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
 

Detailed Description

Definition at line 34 of file SubitemPropertiesReader.php.

Member Function Documentation

◆ getSubitemProperties()

ILIAS\WebResource\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 50 of file SubitemPropertiesReader.php.

54 : Generator {
55 $obj_id = ilObject::_lookupObjId($parent_ref_id);
56 $repo = new ilWebLinkDatabaseRepository($obj_id);
57 foreach ($subitem_ids as $subitem_id) {
58 try {
59 $item = $repo->getItemByLinkId((int) $subitem_id->id());
61 continue;
62 }
63 yield $factory->get(
64 $subitem_id,
65 $item->getTitle(),
66 $this->data_factory->uri($item->getResolvedLink(false)),
67 true,
68 $this->lng->txt('webr')
69 );
70 }
71 }
static _lookupObjId(int $ref_id)

◆ init()

ILIAS\WebResource\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->data_factory = new DataFactory();
48 }
$dic
Definition: ltiresult.php:33

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

+ Here is the call graph for this function:

◆ type()

static ILIAS\WebResource\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 'webr';
42 }

Field Documentation

◆ $data_factory

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

Definition at line 37 of file SubitemPropertiesReader.php.

◆ $lng

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

Definition at line 36 of file SubitemPropertiesReader.php.


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