ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilUsersGalleryGroup.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Services/User/Gallery/interfaces/interface.ilUsersGalleryUserCollection.php';
5
10{
14 protected $users = [];
15
19 protected $highlighted = false;
20
24 protected $label = '';
25
30 public function __construct(array $users)
31 {
32 $this->users = $users;
33 }
34
38 public function setHighlighted($status)
39 {
40 $this->highlighted = (bool) $status;
41 }
42
46 public function isHighlighted()
47 {
48 return (bool) $this->highlighted;
49 }
50
54 public function setLabel($label)
55 {
56 $this->label = $label;
57 }
58
62 public function getLabel()
63 {
64 return $this->label;
65 }
66
70 public function setItems(array $items)
71 {
72 $this->users = $items;
73 }
74
78 public function getItems()
79 {
80 return $this->users;
81 }
82
86 public function count()
87 {
88 return count($this->users);
89 }
90
95 public function current()
96 {
97 return current($this->users);
98 }
99
103 public function next()
104 {
105 next($this->users);
106 }
107
111 public function key()
112 {
113 key($this->users);
114 }
115
119 public function valid()
120 {
121 return key($this->users) !== null;
122 }
123
127 public function rewind()
128 {
129 reset($this->users);
130 }
131}
An exception for terminatinating execution or to throw for unit testing.
Class ilUsersGalleryGroup.
setHighlighted($status)
Set whether or not this group is highlighted.
isHighlighted()
Returns whether or not it is a highlighted group.boolean
__construct(array $users)
ilUsersGalleryGroupImpl constructor.
Interface ilUsersGalleryUserCollection.