LayoutDefaultSidebar.php
1.09 KB
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
40
41
42
43
44
45
46
47
<?php
namespace Nextend\SmartSlider3\Application\Admin\Layout;
use Nextend\SmartSlider3\Application\Admin\Layout\Block\Core\Admin\BlockAdmin;
use Nextend\SmartSlider3\Application\Admin\Layout\Block\Core\ContentSidebar\BlockContentSidebar;
class LayoutDefaultSidebar extends AbstractLayoutMenu {
protected $sidebar = array();
protected function enqueueAssets() {
$this->getApplicationType()
->enqueueAssets();
}
public function addSidebarBlock($html) {
$this->sidebar[] = $html;
}
public function renderSidebarBlock() {
echo $this->getSidebarBlock();
}
public function getSidebarBlock() {
return implode("\n\n", $this->sidebar);
}
public function render() {
$admin = new BlockAdmin($this);
$admin->setLayout($this);
$admin->addClasses($this->getClasses());
$admin->setHeader($this->getHeader());
$content = new BlockContentSidebar($this);
$content->setSidebar($this->getSidebarBlock());
$this->addContentBlock($content);
$admin->display();
}
}