1<?php
2/**
3 * Interface Droppable
4 *
5 * Describes a UI component that can handle drop events from the browser.
6 *
7 * @author  nmaerchy <nm@studer-raimann.ch>
8 * @date    05.05.17
9 * @version 0.0.1
10 *
11 * @package ILIAS\UI\Component
12 */
13
14namespace ILIAS\UI\Component;
15
16interface Droppable extends Triggerer
17{
18
19    /**
20     * Get a component like this, triggering a signal of another component when files have been dropped.
21     * Note: Any previous signals registered on drop are replaced.
22     *
23     * @param Signal $signal a ILIAS UI signal which is used on drop event
24     *
25     * @return $this
26     */
27    public function withOnDrop(Signal $signal);
28
29
30    /**
31     * Get a component like this, triggering a signal of another component when files have been dropped.
32     * In contrast to withOnDrop, the signal is appended to existing signals for the click event.
33     *
34     * @param Signal $signal a ILIAS UI signal which is used on drop event
35     *
36     * @return $this
37     */
38    public function withAdditionalDrop(Signal $signal);
39}
40