-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from clickpress/feature-formgrid
Add Feature formgrid
- Loading branch information
Showing
15 changed files
with
471 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of Contao Clickpress Grid. | ||
* | ||
* (c) Stefan Schulz-Lauterbach (https://clickpress.de) | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Clickpress\ContaoClickpressGridBundle\Forms; | ||
|
||
use Contao\Widget; | ||
|
||
/** | ||
* Column start content element | ||
* Taken with friendly permission from RockSolid Columns. | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
* @author Stefan Schulz-Lauterbach <[email protected]> | ||
* @author Jannik Nölke <[email protected]> | ||
*/ | ||
class FormGridColumnStart extends Widget | ||
{ | ||
/** | ||
* @var string Template | ||
*/ | ||
protected $strTemplate = 'form_grid_column_start'; | ||
|
||
/** | ||
* Do not validate. | ||
*/ | ||
public function validate(): void | ||
{ | ||
} | ||
|
||
/** | ||
* Parse the template file and return it as string. | ||
* | ||
* @param array $arrAttributes An optional attributes array | ||
* | ||
* @return string The template markup | ||
*/ | ||
public function parse($arrAttributes = null): string | ||
{ | ||
if (TL_MODE === 'BE') { | ||
$objTemplate = new \BackendTemplate('be_wildcard'); | ||
|
||
return $objTemplate->parse(); | ||
} | ||
|
||
return parent::parse($arrAttributes); | ||
} | ||
|
||
/** | ||
* Generate the widget and return it as string. | ||
* | ||
* @return string The widget markup | ||
*/ | ||
public function generate(): string | ||
{ | ||
return ''; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of Contao Clickpress Grid. | ||
* | ||
* (c) Stefan Schulz-Lauterbach (https://clickpress.de) | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Clickpress\ContaoClickpressGridBundle\Forms; | ||
|
||
use Contao\Widget; | ||
|
||
/** | ||
* Column stop content element | ||
* Taken with friendly permission from RockSolid Columns. | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
* @author Stefan Schulz-Lauterbach <[email protected]> | ||
* @author Jannik Nölke <[email protected]> | ||
*/ | ||
class FormGridColumnStop extends Widget | ||
{ | ||
/** | ||
* @var string Template | ||
*/ | ||
protected $strTemplate = 'form_grid_column_stop'; | ||
|
||
/** | ||
* Do not validate. | ||
*/ | ||
public function validate() :void | ||
{ | ||
} | ||
|
||
/** | ||
* Parse the template file and return it as string. | ||
* | ||
* @param array $arrAttributes An optional attributes array | ||
* | ||
* @return string The template markup | ||
*/ | ||
public function parse($arrAttributes = null) :string | ||
{ | ||
if (TL_MODE === 'BE') { | ||
$objTemplate = new \BackendTemplate('be_wildcard'); | ||
|
||
return $objTemplate->parse(); | ||
} | ||
|
||
return parent::parse($arrAttributes); | ||
} | ||
|
||
/** | ||
* Generate the widget and return it as string. | ||
* | ||
* @return string The widget markup | ||
*/ | ||
public function generate(): string | ||
{ | ||
return ''; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of Contao Clickpress Grid. | ||
* | ||
* (c) Stefan Schulz-Lauterbach (https://clickpress.de) | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Clickpress\ContaoClickpressGridBundle\Forms; | ||
|
||
use Contao\Widget; | ||
|
||
/** | ||
* Grid start content element | ||
* Taken with friendly permission from RockSolid Columns. | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
* @author Stefan Schulz-Lauterbach <[email protected]> | ||
* @author Jannik Nölke <[email protected]> | ||
*/ | ||
class FormGridStart extends Widget | ||
{ | ||
/** | ||
* @var string Template | ||
*/ | ||
protected $strTemplate = 'form_grid_start'; | ||
|
||
/** | ||
* Do not validate. | ||
*/ | ||
public function validate() :void | ||
{ | ||
} | ||
|
||
/** | ||
* Parse the template file and return it as string. | ||
* | ||
* @param array $arrAttributes An optional attributes array | ||
* | ||
* @return string The template markup | ||
*/ | ||
public function parse($arrAttributes = null) :string | ||
{ | ||
if (TL_MODE === 'BE') { | ||
$objTemplate = new \BackendTemplate('be_wildcard'); | ||
|
||
return $objTemplate->parse(); | ||
} | ||
$gridClasses = [ | ||
preg_replace('/grid/', 'grid_desktop', $this->form_cp_grid_desktop), | ||
preg_replace('/grid/', 'grid_tablet', $this->form_cp_grid_tablet), | ||
preg_replace('/grid/', 'grid_mobile', $this->form_cp_grid_mobile), | ||
]; | ||
$arrAttributes['gridClasses'] = implode(' ', $gridClasses); | ||
|
||
return parent::parse($arrAttributes); | ||
} | ||
|
||
/** | ||
* Generate the widget and return it as string. | ||
* | ||
* @return string The widget markup | ||
*/ | ||
public function generate(): string | ||
{ | ||
return ''; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of Contao Clickpress Grid. | ||
* | ||
* (c) Stefan Schulz-Lauterbach (https://clickpress.de) | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Clickpress\ContaoClickpressGridBundle\Forms; | ||
|
||
use Contao\Widget; | ||
|
||
/** | ||
* Grid stop content element | ||
* Taken with friendly permission from RockSolid Columns. | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
* @author Stefan Schulz-Lauterbach <[email protected]> | ||
* @author Jannik Nölke <[email protected]> | ||
*/ | ||
class FormGridStop extends Widget | ||
{ | ||
/** | ||
* @var string Template | ||
*/ | ||
protected $strTemplate = 'form_grid_stop'; | ||
|
||
/** | ||
* Do not validate. | ||
*/ | ||
public function validate() | ||
{ | ||
} | ||
|
||
/** | ||
* Parse the template file and return it as string. | ||
* | ||
* @param array $arrAttributes An optional attributes array | ||
* | ||
* @return string The template markup | ||
*/ | ||
public function parse($arrAttributes = null): string | ||
{ | ||
if (TL_MODE === 'BE') { | ||
$objTemplate = new \BackendTemplate('be_wildcard'); | ||
|
||
return $objTemplate->parse(); | ||
} | ||
|
||
return parent::parse($arrAttributes); | ||
} | ||
|
||
/** | ||
* Generate the widget and return it as string. | ||
* | ||
* @return string The widget markup | ||
*/ | ||
public function generate(): string | ||
{ | ||
return ''; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
* | ||
* @author Martin Auswöger <[email protected]> | ||
* @author Stefan Schulz-Lauterbach <[email protected]> | ||
* @author Jannik Nölke <[email protected]> | ||
*/ | ||
|
||
$GLOBALS['TL_CTE']['cp_grid']['cp_grid_start'] = 'Clickpress\\ContaoClickpressGridBundle\\Element\\GridStart'; | ||
|
@@ -25,3 +26,8 @@ | |
$GLOBALS['TL_WRAPPERS']['stop'][] = 'cp_grid_stop'; | ||
$GLOBALS['TL_WRAPPERS']['start'][] = 'cp_column_start'; | ||
$GLOBALS['TL_WRAPPERS']['stop'][] = 'cp_column_stop'; | ||
|
||
$GLOBALS['TL_FFL']['cp_grid_start'] = 'Clickpress\\ContaoClickpressGridBundle\\Forms\\FormGridStart'; | ||
$GLOBALS['TL_FFL']['cp_grid_stop'] = 'Clickpress\\ContaoClickpressGridBundle\\Forms\\FormGridStop'; | ||
$GLOBALS['TL_FFL']['cp_column_start'] = 'Clickpress\\ContaoClickpressGridBundle\\Forms\\FormGridColumnStart'; | ||
$GLOBALS['TL_FFL']['cp_column_stop'] = 'Clickpress\\ContaoClickpressGridBundle\\Forms\\FormGridColumnStop'; |
Oops, something went wrong.