Source of file BotstrapElementController.php
Size: 0,897 Bytes - Last Modified: 2021-12-23T10:50:32+00:00
/var/www/docs.ssmods.com/process/src/src/Controllers/BotstrapElementController.php
1234567891011121314151617181920212223242526272829303132333435 | <?php namespace Syntro\SilverstripeElementalBootstrap\Controllers; use SilverStripe\View\SSViewer; use DNADesign\Elemental\Controllers\ElementController; /** * We have to expand the default ElementController to not wrap every * Element in an additional div (this interferes with bootstrap classes) * @author Matthias Leutenegger */ class BootstrapElementController extends ElementController { /** * forTemplate - renders the object for display in html * * @return string */ public function forTemplate() { $template = $this->element->config()->get('controller_template'); $viewer = SSViewer::create( [ 'type' => 'Layout', 'Syntro\\SilverstripeElementalBootstrap\\' . $template ] ); $html = $this->renderWith($viewer->setRewriteHashLinks(false)); return $html; } } |