public function view() { $bv = new BlockView($this->block); if (isset($_REQUEST['arGridMaximumColumns'])) { $this->area->setAreaGridMaximumColumns(intval($_REQUEST['arGridMaximumColumns'])); } if (isset($_REQUEST['arEnableGridContainer']) && $_REQUEST['arEnableGridContainer'] == 1) { $this->area->enableGridContainer(); } $bv->addScopeItems(array('c' => $this->page, 'a' => $this->area, 'dialogController' => $this)); $this->set('bv', $bv); }
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'); }
public function render() { $loc = Localization::getInstance(); $loc->setActiveContext('site'); $c = $this->block->getBlockCollectionObject(); $dl = Core::make('multilingual/detector'); $dl->setupSiteInterfaceLocalization($this->page); $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'); }
public function view() { $bv = new BlockView($this->blockType); $bv->setAreaObject($this->area); // Handle special posted area parameters here if (isset($_REQUEST['arGridMaximumColumns'])) { $this->area->setAreaGridMaximumColumns(intval($_REQUEST['arGridMaximumColumns'])); } if (isset($_REQUEST['arEnableGridContainer']) && $_REQUEST['arEnableGridContainer'] == 1) { $this->area->enableGridContainer(); } $bv->addScopeItems(array('a' => $this->a, 'cp' => $this->permissions, 'ap' => $this->areaPermissions)); $this->set('blockView', $bv); $this->set('blockType', $this->blockType); $this->set('btHandle', $this->blockType->getBlockTypeHandle()); $this->set("blockTypeController", $this->blockTypeController); $this->set('area', $this->area); }
public function view() { $btc = $this->block->getInstance(); $btc->outputAutoHeaderItems(); $bv = new BlockView($this->block); $bv->addScopeItems(array('c' => $this->page, 'a' => $this->area, 'dialogController' => $this)); $this->set('bv', $bv); $canEditCustomTemplate = false; if ($this->permissions->canEditBlockCustomTemplate()) { $canEditCustomTemplate = true; switch ($this->block->getBlockTypeHandle()) { case BLOCK_HANDLE_SCRAPBOOK_PROXY: $bi = $this->block->getInstance(); $bx = \Block::getByID($bi->getOriginalBlockID()); $bt = \BlockType::getByID($bx->getBlockTypeID()); $bFilename = $bx->getBlockFilename(); break; case BLOCK_HANDLE_PAGE_TYPE_OUTPUT_PROXY: $bi = $this->block->getInstance(); $output = $bi->getComposerOutputControlObject(); $control = FormLayoutSetControl::getByID($output->getPageTypeComposerFormLayoutSetControlID()); $object = $control->getPageTypeComposerControlObject(); if ($object instanceof BlockControl) { $bt = $object->getBlockTypeObject(); } $bFilename = $this->block->getBlockFilename(); break; default: $bt = \BlockType::getByID($this->block->getBlockTypeID()); $bFilename = $this->block->getBlockFilename(); break; } $templates = array(); if (is_object($bt)) { $templates = $bt->getBlockTypeCustomTemplates(); } $this->set('bFilename', $bFilename); $this->set('templates', $templates); } $this->set('canEditCustomTemplate', $canEditCustomTemplate); }
<?php use Concrete\Core\Block\View\BlockView; defined('C5_EXECUTE') or die("Access Denied."); $bo = Block::getByID($bOriginalID); $bp = new Permissions($bo); $bo->setProxyBlock($b); if ($bp->canWrite()) { $bv = new BlockView($bo); ?> <div class="ccm-ui"> <div class="alert alert-info"> <?php echo t("This block was copied from another location. Editing it will create a new instance of it."); ?> </div> </div> <?php $bv->addScopeItems($view->getScopeItems()); $bv->render('edit'); }
public function view() { $btc = $this->block->getInstance(); $btc->outputAutoHeaderItems(); $bv = new BlockView($this->block); $bv->addScopeItems(array('c' => $this->page, 'a' => $this->area, 'dialogController' => $this)); $this->set('bv', $bv); $canEditCustomTemplate = false; if ($this->permissions->canEditBlockCustomTemplate()) { $canEditCustomTemplate = true; if ($this->block->getBlockTypeHandle() == BLOCK_HANDLE_SCRAPBOOK_PROXY) { $bi = $this->block->getInstance(); $bx = \Block::getByID($bi->getOriginalBlockID()); $bt = \BlockType::getByID($bx->getBlockTypeID()); } else { $bt = \BlockType::getByID($this->block->getBlockTypeID()); } $templates = $bt->getBlockTypeCustomTemplates(); $this->set('templates', $templates); } $this->set('canEditCustomTemplate', $canEditCustomTemplate); }