ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
trait.ilSearchResultTableHelper.php File Reference

Go to the source code of this file.

Functions

 getPossibleSortations ()
 Returns key => label. More...
 
 getDefaultSortation ()
 
 getCurrentSortation ()
 
 buildSortationViewControl ()
 

Variables

trait ilSearchResultTableHelper
 

Function Documentation

◆ buildSortationViewControl()

buildSortationViewControl ( )
protected

Definition at line 53 of file trait.ilSearchResultTableHelper.php.

53 : SortationViewControl
54 {
55 $options = $this->getPossibleSortations();
56 $current_sortation = $this->getCurrentSortation();
57
58 return $this->ui->factory()->viewControl()
59 ->sortation($options, $current_sortation)
60 ->withLabelPrefix($this->lng->txt('search_sort_by'))
61 ->withTargetURL(
62 $this->ctrl->getLinkTarget($this->parent_obj, $this->parent_cmd),
63 'sortation'
64 );
65 }
getPossibleSortations()
Returns key => label.

References ILIAS\Repository\ctrl(), getCurrentSortation(), getPossibleSortations(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

Referenced by ilRepositoryUserResultTableGUI\getHTML(), and ilSearchResultTableGUI\getHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCurrentSortation()

getCurrentSortation ( )
protected

Definition at line 34 of file trait.ilSearchResultTableHelper.php.

34 : string
35 {
36 if (isset($this->current_sortation)) {
37 return $this->current_sortation;
38 }
39
40 $sortation = $this->getDefaultSortation();
41 if ($this->http->wrapper()->query()->has('sortation')) {
42 $sortation = $this->http->wrapper()->query()->retrieve(
43 'sortation',
44 $this->refinery->kindlyTo()->string()
45 );
46 }
47 if (!array_key_exists($sortation, $this->getPossibleSortations())) {
48 $sortation = $this->getDefaultSortation();
49 }
50 return $this->current_sortation = $sortation;
51 }
static http()
Fetches the global http state from ILIAS.
getDefaultSortation()

References getDefaultSortation(), getPossibleSortations(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by ilRepositoryUserResultTableGUI\applySortation(), buildSortationViewControl(), and ilSearchResultTableGUI\setDataAndApplySortation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDefaultSortation()

getDefaultSortation ( )
abstractprotected

Referenced by getCurrentSortation().

+ Here is the caller graph for this function:

◆ getPossibleSortations()

getPossibleSortations ( )
abstractprotected

Returns key => label.

Referenced by buildSortationViewControl(), and getCurrentSortation().

+ Here is the caller graph for this function:

Variable Documentation

◆ ilSearchResultTableHelper

trait ilSearchResultTableHelper
Initial value:
{
protected string $current_sortation

Definition at line 23 of file trait.ilSearchResultTableHelper.php.