1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5namespace ILIAS\UI\Implementation\Component\ViewControl;
6
7/**
8 * Trait for panels supporting view controls
9 */
10trait HasViewControls
11{
12    /**
13     * @var array
14     */
15    protected $view_controls;
16
17    /**
18     * @inheritDoc
19     */
20    public function withViewControls(array $view_controls) : \ILIAS\UI\Component\Component
21    {
22        $clone = clone $this;
23        $clone->view_controls = $view_controls;
24        return $clone;
25    }
26    /**
27     * @inheritDoc
28     */
29    public function getViewControls() : ?array
30    {
31        return $this->view_controls;
32    }
33}
34