Initial work on moving media controller to the backend
This commit is contained in:
parent
30d4436172
commit
7fd81c4c2a
|
|
@ -0,0 +1,38 @@
|
|||
<?php namespace Backend\Controllers;
|
||||
|
||||
use BackendMenu;
|
||||
use Backend\Classes\Controller;
|
||||
use Backend\Widgets\MediaManager;
|
||||
|
||||
/**
|
||||
* Backend Media Manager
|
||||
*
|
||||
* @package october\backend
|
||||
* @author Alexey Bobkov, Samuel Georges
|
||||
*/
|
||||
class Media extends Controller
|
||||
{
|
||||
/**
|
||||
* @var array Permissions required to view this page.
|
||||
*/
|
||||
public $requiredPermissions = ['media.*'];
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
BackendMenu::setContext('October.Backend', 'media', true);
|
||||
$this->pageTitle = 'cms::lang.media.menu_label';
|
||||
|
||||
$manager = new MediaManager($this, 'manager');
|
||||
$manager->bindToController();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->bodyClass = 'compact-container';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?= Block::put('head') ?><?= Block::endPut() ?>
|
||||
|
||||
<?= Block::put('body') ?>
|
||||
<?= Form::open(['class'=>'layout', 'onsubmit'=>'return false']) ?>
|
||||
<?= $this->widget->manager->render() ?>
|
||||
<?= Form::close() ?>
|
||||
<?= Block::endPut() ?>
|
||||
|
|
@ -1,38 +1,21 @@
|
|||
<?php namespace Cms\Controllers;
|
||||
|
||||
use BackendMenu;
|
||||
use Backend\Classes\Controller;
|
||||
use Cms\Widgets\MediaManager;
|
||||
use Backend\Controllers\Media;
|
||||
|
||||
/**
|
||||
* CMS Media Manager
|
||||
*
|
||||
* @package october\cms
|
||||
* @author Alexey Bobkov, Samuel Georges
|
||||
* @deprecated Use Backend\Controllers\Media. Remove if year >= 2020.
|
||||
*/
|
||||
class Media extends Controller
|
||||
class Media extends MediaController
|
||||
{
|
||||
/**
|
||||
* @var array Permissions required to view this page.
|
||||
*/
|
||||
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';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue