1<?php
2
3/* Copyright (c) 2017 Richard Klees <richard.klees@concepts-and-training.de>, Alex Killing <killing@leifos.de> Extended GPL, see docs/LICENSE */
4
5namespace ILIAS\UI\Component\Item;
6
7/**
8 * Common interface to all items.
9 */
10interface Item extends \ILIAS\UI\Component\Component
11{
12    /**
13     * Gets the title of the item
14     *
15     * @return string|\ILIAS\UI\Component\Button\Shy|\ILIAS\UI\Component\Link\Link
16     */
17    public function getTitle();
18
19    /**
20     * Create a new item with an attached description.
21     */
22    public function withDescription(string $description) : Item;
23
24    /**
25     * Get the description of the item.
26     * @return string
27     */
28    public function getDescription();
29
30    /**
31     * Get a new item with the given properties as key-value pairs.
32     *
33     * The key is holding the title and the value is holding the content of the
34     * specific data set.
35     *
36     * @param array<string,string|\ILIAS\UI\Component\Button\Shy> $properties Label => Content
37     * @return self
38     */
39    public function withProperties(array $properties);
40
41    /**
42     * Get the properties of the appointment.
43     *
44     * @return array<string,string|\ILIAS\UI\Component\Button\Shy>		Title => Content
45     */
46    public function getProperties();
47
48    /**
49     * Create a new appointment item with a set of actions to perform on it.
50     *
51     * @param \ILIAS\UI\Component\Dropdown\Standard $actions
52     * @return Item
53     */
54    public function withActions(\ILIAS\UI\Component\Dropdown\Standard $actions);
55
56    /**
57     * Get the actions of the item.
58     *
59     * @return \ILIAS\UI\Component\Dropdown\Standard
60     */
61    public function getActions();
62}
63