Skip to content

Commit

Permalink
suitable for 3.0.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
astroidex authored Mar 21, 2017
1 parent 2210c31 commit e97a67c
Showing 1 changed file with 98 additions and 9 deletions.
107 changes: 98 additions & 9 deletions src/Workshop/DemoBundle/Template/DemoFullscreen.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,111 @@
<?php

namespace Workshop\DemoBundle\Template;

use Mapbender\CoreBundle\Template\Fullscreen;
use Mapbender\CoreBundle\Component\Template;

/**
* Template DemoFullscreen
*
* @author Astrid Emde
*/
class DemoFullscreen extends Fullscreen
class DemoFullscreen extends Template
{
protected static $title = 'Workshop Demo Fullscreen Template';
protected static $css = array(
'@MapbenderCoreBundle/Resources/public/sass/template/fullscreen.scss',
'@WorkshopDemoBundle/Resources/public/demo_fullscreen.css',
);
/**
* @inheritdoc
*/
public static function getRegionsProperties()
{
return array(
'sidepane' => array(
'tabs' => array(
'name' => 'tabs',
'label' => 'mb.manager.template.region.tabs.label'),
'accordion' => array(
'name' => 'accordion',
'label' => 'mb.manager.template.region.accordion.label')
)
);
}

/**
* @inheritdoc
*/
public static function getTitle()
{
return 'DemoFullscreen';
}

/**
* @inheritdoc
*/
static public function listAssets()
{
$assets = array(
'css' => array('@MapbenderCoreBundle/Resources/public/sass/template/fullscreen.scss','@WorkshopDemoBundle/Resources/public/demo_fullscreen.css'),
'js' => array(
'/components/underscore/underscore-min.js',
'@FOMCoreBundle/Resources/public/js/widgets/popup.js',
'@FOMCoreBundle/Resources/public/js/frontend/sidepane.js',
'@FOMCoreBundle/Resources/public/js/frontend/tabcontainer.js',
'@MapbenderCoreBundle/Resources/public/regional/vendor/notify.0.3.2.min.js',
"/components/datatables/media/js/jquery.dataTables.min.js",
'/components/jquerydialogextendjs/jquerydialogextendjs-built.js',
"/components/vis-ui.js/vis-ui.js-built.js"

),
'trans' => array()
);
return $assets;
}

/**
* @inheritdoc
*/
public function getLateAssets($type)
{
$assets = array(
'css' => array(),
'js' => array(),
'trans' => array()
);
return $assets[$type];
}

/**
* @inheritdoc
*/
public function getAssets($type)
{
$assets = $this::listAssets();
return $assets[$type];
}

/**
* @inheritdoc
*/
public static function getRegions()
{
return array('toolbar', 'sidepane', 'content', 'footer');
}

/**
* @inheritdoc
*/
public function render($format = 'html', $html = true, $css = true,$js = true)
{
$region_props = $this->application->getEntity()->getNamedRegionProperties();
$default_region_props = $this->getRegionsProperties();

public $twigTemplate = 'WorkshopDemoBundle:Template:demo_fullscreen.html.twig';
$templating = $this->container->get('templating');
return $templating
->render('WorkshopDemoBundle:Template:demo_fullscreen.html.twig',
array(
'html' => $html,
'css' => $css,
'js' => $js,
'application' => $this->application,
'region_props' => $region_props,
'default_region_props' => $default_region_props));
}

}

0 comments on commit e97a67c

Please sign in to comment.