ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
with_view_controls.php
Go to the documentation of this file.
1 <?php
2 
4 {
5  global $DIC;
6 
7  $factory = $DIC->ui()->factory();
8  $renderer = $DIC->ui()->renderer();
9 
10  $actions = $factory->dropdown()->standard(array(
11  $factory->button()->shy("ILIAS", "https://www.ilias.de"),
12  $factory->button()->shy("GitHub", "https://www.github.com")
13  ));
14 
15  $legacy = $factory->legacy("Legacy content");
16 
17  $url = $DIC->http()->request()->getRequestTarget();
18 
19  $sort_options = array(
20  'internal_rating' => 'Best',
21  'date_desc' => 'Most Recent',
22  'date_asc' => 'Oldest',
23  );
24  $sortation = $factory->viewControl()->sortation($sort_options)->withTargetURL($url, "");
25 
26  $parameter_name = 'page';
27  $current_page = (int) (array_key_exists($parameter_name, $_GET) ? $_GET[$parameter_name] : 0);
28 
29  $pagination = $factory->viewControl()->pagination()
30  ->withTargetURL($url, $parameter_name)
31  ->withTotalEntries(98)
32  ->withPageSize(10)
33  ->withCurrentPage($current_page);
34 
35 
36  $panel = $factory->panel()->standard(
37  "Panel Title",
38  $factory->legacy("Some Content")
39  )
40  ->withActions($actions)
41  ->withViewControls(array($sortation, $pagination));
42 
43  return $renderer->render($panel);
44 }
if(isset($_FILES['img_file']) &&is_array($_FILES['img_file'])) $panel
Definition: imgupload.php:138
$_GET["client_id"]
global $DIC
Definition: goto.php:24
with_view_controls()
$url
$factory
Definition: metadata.php:58