forked from concretecms/concretecms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
block.php
29 lines (24 loc) · 940 Bytes
/
block.php
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
<?php
namespace Concrete\Controller\Backend;
use Concrete\Controller\Backend\UserInterface\Block as BackendInterfaceBlockController;
use Concrete\Core\Block\View\BlockView;
use Concrete\Core\View\DialogView;
class Block extends BackendInterfaceBlockController
{
public function render()
{
$btc = $this->block->getInstance();
$bv = new BlockView($this->block);
if (isset($_REQUEST['arEnableGridContainer']) && $_REQUEST['arEnableGridContainer'] == 1) {
$this->area->enableGridContainer();
}
$this->area->forceControlsToDisplay(); // we always want to show them controls.
$bv->addScopeItems(array('c' => $this->page, 'a' => $this->area, 'dialogController' => $this));
$this->set('bv', $bv);
$this->view = new DialogView('/backend/block');
}
protected function canAccess()
{
return $this->permissions->canViewEditInterface();
}
}