ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\UI\Component\ViewControl\Pagination Interface Reference

This describes a Pagination Control. More...

+ Inheritance diagram for ILIAS\UI\Component\ViewControl\Pagination:
+ Collaboration diagram for ILIAS\UI\Component\ViewControl\Pagination:

Public Member Functions

 withTargetURL (string $url, string $parameter_name)
 Get a Pagination with this target-url. More...
 
 getTargetURL ()
 Get the url this instance should trigger. More...
 
 getParameterName ()
 Get the parameter this instance uses. More...
 
 withTotalEntries (int $total)
 Initialize with the total amount of entries of the controlled data-list. More...
 
 withPageSize (int $size)
 Set the amount of entries per page. More...
 
 getPageSize ()
 Get the number of entries per page. More...
 
 withCurrentPage (int $page)
 Set the selected page. More...
 
 getCurrentPage ()
 Get the currently selected page. More...
 
 withOnSelect (Signal $signal)
 Register a signal with the control. More...
 
 getNumberOfPages ()
 Calculate the total number of pages. More...
 
 withMaxPaginationButtons (int $amount)
 Layout; define, how many page-options are shown (max). More...
 
 getMaxPaginationButtons ()
 Get the maximum amount of page-entries (not records per page!) to be shown. More...
 
 withDropdownAt (int $amount)
 Layout; when number of page-entries reaches $amount, the options will be rendered as dropdown. More...
 
 getDropdownAt ()
 Below this value, the options are directly rendered as shy-buttons, on and above this value a dropdown is being used. More...
 
 withDropdownLabel (string $template)
 Layout; set the label for dropdown. More...
 
 getDropdownLabel ()
 Get the template for the label of the dropdown. More...
 
 getDefaultDropdownLabel ()
 Get the default label (for comparison, mainly) - the default label will be translated, a custom label will not. More...
 
 getRange ()
 Get the current number of entries on this page. More...
 
- Public Member Functions inherited from ILIAS\UI\Component\Component
 getCanonicalName ()
 Get the canonical name of the component. More...
 
 reduceWith (\Closure $fn)
 The scheme starts at the leaves of the structure and applies the function to each leave and moves up the tree recursively. More...
 
- Public Member Functions inherited from ILIAS\UI\Component\JavaScriptBindable
 withOnLoadCode (Closure $binder)
 
 withAdditionalOnLoadCode (Closure $binder)
 Add some onload-code to the component instead of replacing the existing one. More...
 
 getOnLoadCode ()
 Get the currently bound on load code. More...
 
- Public Member Functions inherited from ILIAS\UI\Component\Triggerer
 withResetTriggeredSignals ()
 Get a component like this but reset any triggered signals of other components. More...
 
 getTriggeredSignals ()
 Get all triggered signals of this component. More...
 

Data Fields

const DEFAULT_DROPDOWN_LABEL = 'pagination_label_x_of_y'
 

Detailed Description

This describes a Pagination Control.

Definition at line 32 of file Pagination.php.

Member Function Documentation

◆ getCurrentPage()

ILIAS\UI\Component\ViewControl\Pagination::getCurrentPage ( )

Get the currently selected page.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ getDefaultDropdownLabel()

ILIAS\UI\Component\ViewControl\Pagination::getDefaultDropdownLabel ( )

Get the default label (for comparison, mainly) - the default label will be translated, a custom label will not.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ getDropdownAt()

ILIAS\UI\Component\ViewControl\Pagination::getDropdownAt ( )

Below this value, the options are directly rendered as shy-buttons, on and above this value a dropdown is being used.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ getDropdownLabel()

ILIAS\UI\Component\ViewControl\Pagination::getDropdownLabel ( )

Get the template for the label of the dropdown.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ getMaxPaginationButtons()

ILIAS\UI\Component\ViewControl\Pagination::getMaxPaginationButtons ( )

Get the maximum amount of page-entries (not records per page!) to be shown.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ getNumberOfPages()

ILIAS\UI\Component\ViewControl\Pagination::getNumberOfPages ( )

Calculate the total number of pages.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ getPageSize()

ILIAS\UI\Component\ViewControl\Pagination::getPageSize ( )

Get the number of entries per page.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ getParameterName()

ILIAS\UI\Component\ViewControl\Pagination::getParameterName ( )

Get the parameter this instance uses.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ getRange()

ILIAS\UI\Component\ViewControl\Pagination::getRange ( )

Get the current number of entries on this page.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ getTargetURL()

ILIAS\UI\Component\ViewControl\Pagination::getTargetURL ( )

Get the url this instance should trigger.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ withCurrentPage()

ILIAS\UI\Component\ViewControl\Pagination::withCurrentPage ( int  $page)

Set the selected page.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ withDropdownAt()

ILIAS\UI\Component\ViewControl\Pagination::withDropdownAt ( int  $amount)

Layout; when number of page-entries reaches $amount, the options will be rendered as dropdown.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ withDropdownLabel()

ILIAS\UI\Component\ViewControl\Pagination::withDropdownLabel ( string  $template)

Layout; set the label for dropdown.

If need (or wish) arises, you can give a template-string with variables for current and total page numbers. The string will be filled with sprintf($template, $current_page, $total_pages), so, e.g.: "page %1$d of %2$d" or "from %2$d, this is %1$d".

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ withMaxPaginationButtons()

ILIAS\UI\Component\ViewControl\Pagination::withMaxPaginationButtons ( int  $amount)

Layout; define, how many page-options are shown (max).

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ withOnSelect()

ILIAS\UI\Component\ViewControl\Pagination::withOnSelect ( Signal  $signal)

Register a signal with the control.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ withPageSize()

ILIAS\UI\Component\ViewControl\Pagination::withPageSize ( int  $size)

◆ withTargetURL()

ILIAS\UI\Component\ViewControl\Pagination::withTargetURL ( string  $url,
string  $parameter_name 
)

Get a Pagination with this target-url.

Shy-Buttons in this control will link to this url and add $parameter_name with the selected value.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

◆ withTotalEntries()

ILIAS\UI\Component\ViewControl\Pagination::withTotalEntries ( int  $total)

Initialize with the total amount of entries of the controlled data-list.

Implemented in ILIAS\UI\Implementation\Component\ViewControl\Pagination.

Field Documentation

◆ DEFAULT_DROPDOWN_LABEL

const ILIAS\UI\Component\ViewControl\Pagination::DEFAULT_DROPDOWN_LABEL = 'pagination_label_x_of_y'

Definition at line 34 of file Pagination.php.


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