mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Note if media management is restricted, it can still be accessed via the Rich Editor - we need to address this concern later. This change is to allow the menu item to be toggled on/off.
35 lines
710 B
PHP
35 lines
710 B
PHP
<?php namespace Cms\Controllers;
|
|
|
|
use BackendMenu;
|
|
use Backend\Classes\Controller;
|
|
use Cms\Widgets\MediaManager;
|
|
|
|
/**
|
|
* CMS Media Manager
|
|
*
|
|
* @package october\cms
|
|
* @author Alexey Bobkov, Samuel Georges
|
|
*/
|
|
class Media extends Controller
|
|
{
|
|
public $requiredPermissions = ['media.*'];
|
|
|
|
/**
|
|
* Constructor.
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
|
|
BackendMenu::setContext('October.Cms', 'media', true);
|
|
$this->pageTitle = 'cms::lang.media.menu_label';
|
|
|
|
$manager = new MediaManager($this, 'manager');
|
|
$manager->bindToController();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$this->bodyClass = 'compact-container';
|
|
}
|
|
} |