-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Contao to version 4.13 and 5.0
- Loading branch information
Showing
7 changed files
with
55 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,12 +8,18 @@ | |
|
||
namespace MadeYourDay\RockSolidColumns\Element; | ||
|
||
use Contao\BackendTemplate; | ||
use Contao\ContentElement; | ||
use Contao\FrontendTemplate; | ||
use Contao\System; | ||
use Symfony\Component\HttpFoundation\Request; | ||
|
||
/** | ||
* Column start content element | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
*/ | ||
class ColumnStart extends \ContentElement | ||
class ColumnStart extends ContentElement | ||
{ | ||
/** | ||
* @var string Template | ||
|
@@ -27,7 +33,7 @@ class ColumnStart extends \ContentElement | |
*/ | ||
public function generate() | ||
{ | ||
if (TL_MODE === 'BE') { | ||
if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) { | ||
return parent::generate(); | ||
} | ||
|
||
|
@@ -71,13 +77,13 @@ public function generate() | |
*/ | ||
public function compile() | ||
{ | ||
if (TL_MODE == 'BE') { | ||
if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) { | ||
$this->strTemplate = 'be_wildcard'; | ||
$this->Template = new \BackendTemplate($this->strTemplate); | ||
$this->Template = new BackendTemplate($this->strTemplate); | ||
$this->Template->title = $this->headline; | ||
} | ||
else { | ||
$this->Template = new \FrontendTemplate($this->strTemplate); | ||
$this->Template = new FrontendTemplate($this->strTemplate); | ||
$this->Template->setData($this->arrData); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,12 +8,18 @@ | |
|
||
namespace MadeYourDay\RockSolidColumns\Element; | ||
|
||
use Contao\BackendTemplate; | ||
use Contao\ContentElement; | ||
use Contao\FrontendTemplate; | ||
use Contao\System; | ||
use Symfony\Component\HttpFoundation\Request; | ||
|
||
/** | ||
* Column stop content element | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
*/ | ||
class ColumnStop extends \ContentElement | ||
class ColumnStop extends ContentElement | ||
{ | ||
/** | ||
* @var string Template | ||
|
@@ -27,7 +33,7 @@ class ColumnStop extends \ContentElement | |
*/ | ||
public function generate() | ||
{ | ||
if (TL_MODE === 'BE') { | ||
if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) { | ||
return parent::generate(); | ||
} | ||
|
||
|
@@ -49,13 +55,13 @@ public function generate() | |
*/ | ||
public function compile() | ||
{ | ||
if (TL_MODE == 'BE') { | ||
if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) { | ||
$this->strTemplate = 'be_wildcard'; | ||
$this->Template = new \BackendTemplate($this->strTemplate); | ||
$this->Template = new BackendTemplate($this->strTemplate); | ||
$this->Template->title = $this->headline; | ||
} | ||
else { | ||
$this->Template = new \FrontendTemplate($this->strTemplate); | ||
$this->Template = new FrontendTemplate($this->strTemplate); | ||
$this->Template->setData($this->arrData); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,12 +8,18 @@ | |
|
||
namespace MadeYourDay\RockSolidColumns\Element; | ||
|
||
use Contao\BackendTemplate; | ||
use Contao\ContentElement; | ||
use Contao\FrontendTemplate; | ||
use Contao\System; | ||
use Symfony\Component\HttpFoundation\Request; | ||
|
||
/** | ||
* Columns start content element | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
*/ | ||
class ColumnsStart extends \ContentElement | ||
class ColumnsStart extends ContentElement | ||
{ | ||
/** | ||
* @var string Template | ||
|
@@ -27,7 +33,7 @@ class ColumnsStart extends \ContentElement | |
*/ | ||
public function generate() | ||
{ | ||
if (TL_MODE === 'BE') { | ||
if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) { | ||
return parent::generate(); | ||
} | ||
|
||
|
@@ -122,13 +128,13 @@ public static function getColumnsConfiguration(array $data) | |
*/ | ||
public function compile() | ||
{ | ||
if (TL_MODE == 'BE') { | ||
if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) { | ||
$this->strTemplate = 'be_wildcard'; | ||
$this->Template = new \BackendTemplate($this->strTemplate); | ||
$this->Template = new BackendTemplate($this->strTemplate); | ||
$this->Template->title = $this->headline; | ||
} | ||
else { | ||
$this->Template = new \FrontendTemplate($this->strTemplate); | ||
$this->Template = new FrontendTemplate($this->strTemplate); | ||
$this->Template->setData($this->arrData); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,12 +8,18 @@ | |
|
||
namespace MadeYourDay\RockSolidColumns\Element; | ||
|
||
use Contao\BackendTemplate; | ||
use Contao\ContentElement; | ||
use Contao\FrontendTemplate; | ||
use Contao\System; | ||
use Symfony\Component\HttpFoundation\Request; | ||
|
||
/** | ||
* Columns stop content element | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
*/ | ||
class ColumnsStop extends \ContentElement | ||
class ColumnsStop extends ContentElement | ||
{ | ||
/** | ||
* @var string Template | ||
|
@@ -27,7 +33,7 @@ class ColumnsStop extends \ContentElement | |
*/ | ||
public function generate() | ||
{ | ||
if (TL_MODE === 'BE') { | ||
if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) { | ||
return parent::generate(); | ||
} | ||
|
||
|
@@ -61,13 +67,13 @@ public function generate() | |
*/ | ||
public function compile() | ||
{ | ||
if (TL_MODE == 'BE') { | ||
if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) { | ||
$this->strTemplate = 'be_wildcard'; | ||
$this->Template = new \BackendTemplate($this->strTemplate); | ||
$this->Template = new BackendTemplate($this->strTemplate); | ||
$this->Template->title = $this->headline; | ||
} | ||
else { | ||
$this->Template = new \FrontendTemplate($this->strTemplate); | ||
$this->Template = new FrontendTemplate($this->strTemplate); | ||
$this->Template->setData($this->arrData); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,10 @@ | |
* @author Martin Auswöger <[email protected]> | ||
*/ | ||
|
||
if (TL_MODE === 'BE') { | ||
use Contao\System; | ||
use Symfony\Component\HttpFoundation\Request; | ||
|
||
if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) { | ||
$GLOBALS['TL_CSS'][] = 'bundles/rocksolidcolumns/css/be_main.css'; | ||
} | ||
|
||
|