aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/stock_images.php
blob: 7310d141fe2b5c47f696d39799286c81323843b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php

class StockImagesController extends AuthenticatedController
{
    /**
     * Common tasks for all actions.
     */
    public function before_filter(&$action, &$args)
    {
        parent::before_filter($action, $args);

        URLHelper::removeLinkParam('cid');
        $GLOBALS['perm']->check('admin');

        Navigation::activateItem('/admin/locations/stock_images');
        \PageLayout::setTitle(_('Verwaltung des Bilder-Pools'));
        $this->setSidebar();
    }

    /**
     * Administration view for banner
     */
    public function index_action(): void
    {
        $this->render_vue_app(
            Studip\VueApp::create('StockImages')
                ->withPlugin('StockImagesPlugin', 'stock-images')
        );
    }

    /**
     * Setup the sidebar
     */
    protected function setSidebar(): void
    {
        $sidebar = \Sidebar::Get();
        $sidebar->addWidget(new \VueWidget('stock-images-widget'));
    }
}