ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Listing.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2016 Timon Amstutz <timon.amstutz@ilub.unibe.ch> Extended GPL, see docs/LICENSE */
4
6
8use ILIAS\UI\Implementation\Component\ComponentHelper;
9
14class Listing implements C\Listing\Listing {
15 use ComponentHelper;
16
20 private $items;
21
22
27 public function __construct($items) {
28 $types = array('string',C\Component::class);
29 $this->checkArgListElements("items", $items, $types);
30 $this->items = $items;
31 }
32
36 public function withItems(array $items){
37 $types = array('string',C\Component::class);
38 $this->checkArgListElements("items", $items, $types);
39
40 $clone = clone $this;
41 $clone->items = $items;
42 return $clone;
43 }
44
48 public function getItems() {
49 return $this->items;
50 }
51}
An exception for terminatinating execution or to throw for unit testing.
__construct($items)
Listing constructor.
Definition: Listing.php:27