-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from menatwork-ia/feature/contao4
Feature/contao4
- Loading branch information
Showing
20 changed files
with
217 additions
and
124 deletions.
There are no files selected for viewing
File renamed without changes.
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,24 @@ | ||
ExtendedEditors | ||
=============== | ||
|
||
About | ||
----- | ||
|
||
extendedEditors provides additional Insert Tags for external URLs and current language | ||
|
||
Following additional Tags are available: | ||
|
||
- HTTP | ||
- cache_http | ||
- https | ||
- cache_https | ||
- anchor | ||
- anchor_open | ||
- anchor_close | ||
- comments | ||
- download | ||
|
||
Troubleshooting | ||
--------------- | ||
|
||
If you are having problems using syncCto, please visit the issue tracker at https://github.com/menatwork-ia/extendedEditors/issues |
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name":"menatwork/extendededitors", | ||
"description":"New inserttags for external URLs and current language", | ||
"keywords":["editors", "inserttag", "language"], | ||
"type":"contao-module", | ||
"type":"contao-bundle", | ||
"license":"LGPL-3.0+", | ||
"authors":[ | ||
{ | ||
|
@@ -13,27 +13,33 @@ | |
}, | ||
{ | ||
"name":"Stefan Heimes", | ||
"email":"[email protected]", | ||
"email":"[email protected]", | ||
"homepage":"http://www.men-at-work.de", | ||
"role":"Developer" | ||
}, | ||
{ | ||
"name":"Andreas Dziemba", | ||
"email":"[email protected]", | ||
"homepage":"http://www.men-at-work.de", | ||
"role":"Developer" | ||
} | ||
], | ||
"require":{ | ||
"php":">=5.3", | ||
"contao/core":">=2.11,<4", | ||
"contao-community-alliance/composer-installer":"*" | ||
"php":"^7.0", | ||
"contao/core-bundle":"^4.4.0" | ||
}, | ||
|
||
"autoload":{ | ||
"classmap":["system/"] | ||
"psr-4": { | ||
"MenAtWork\\ExtendedEditorsBundle\\": "src" | ||
} | ||
}, | ||
|
||
"replace":{ | ||
"contao-legacy/extendededitors":"*" | ||
}, | ||
|
||
"extra":{ | ||
"contao":{ | ||
"sources":{ | ||
"system/modules/x-editors":"system/modules/x-editors" | ||
} | ||
} | ||
"contao-manager-plugin": "MenAtWork\\ExtendedEditorsBundle\\ContaoManager\\Plugin" | ||
} | ||
} |
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,61 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: Andreas.Dziemba | ||
* Date: 15.01.2018 | ||
* Time: 17:08 | ||
*/ | ||
|
||
namespace MenAtWork\ExtendedEditorsBundle\Contao\Table; | ||
|
||
use Contao\FormHidden; | ||
|
||
/** | ||
* Class maw_tl_form_field | ||
* | ||
* Provide miscellaneous methods that are used by the data configuration array. | ||
* @copyright MEN AT WORK 2011 | ||
* @author MEN AT WORK <[email protected]> | ||
* @package Controller | ||
*/ | ||
class FormField | ||
{ | ||
|
||
/** | ||
* Add the type of input field | ||
* @param array | ||
* @return string | ||
*/ | ||
public function listFormFields($arrRow) | ||
{ | ||
$key = $arrRow['invisible'] ? 'unpublished' : 'published'; | ||
|
||
$strType = ' | ||
<div class="cte_type ' . $key . '">' . $GLOBALS['TL_LANG']['FFL'][$arrRow['type']][0] . ($arrRow['mandatory'] ? ' * ' : ''). ($arrRow['name'] ? ' (' . $arrRow['name'] . ')' : '') . ($arrRow['class'] ? ' [' . $arrRow['class'] . ']' : '') . '</div> | ||
<div class="limit_height' . (!$GLOBALS['TL_CONFIG']['doNotCollapse'] ? ' h32' : '') . ' block">'; | ||
|
||
$strClass = $GLOBALS['TL_FFL'][$arrRow['type']]; | ||
|
||
if (!class_exists($strClass)) | ||
{ | ||
return ''; | ||
} | ||
|
||
$objWidget = new $strClass($arrRow); | ||
|
||
$strWidget = $objWidget->parse(); | ||
$strWidget = preg_replace('/ name="[^"]+"/i', '', $strWidget); | ||
$strWidget = str_replace('type="submit"', 'type="button"', $strWidget); | ||
|
||
if ($objWidget instanceof FormHidden) | ||
{ | ||
return $strType . "\n" . $objWidget->value . "\n</div>\n"; | ||
} | ||
|
||
return $strType . ' | ||
<table cellspacing="0" cellpadding="0" class="tl_form_field_preview" summary="Table holds a form input field"> | ||
'.$strWidget.'</table> | ||
</div>' . "\n"; | ||
} | ||
|
||
} |
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,28 @@ | ||
<?php | ||
/** | ||
* @copyright MEN AT WORK 2018 | ||
* @package extendedEditors | ||
* @license GNU/LGPL | ||
*/ | ||
|
||
namespace MenAtWork\ExtendedEditorsBundle\ContaoManager; | ||
|
||
use MenAtWork\ExtendedEditorsBundle\ExtendedEditorsBundle; | ||
use Contao\CoreBundle\ContaoCoreBundle; | ||
use Contao\ManagerPlugin\Bundle\BundlePluginInterface; | ||
use Contao\ManagerPlugin\Bundle\Config\BundleConfig; | ||
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface; | ||
|
||
class Plugin implements BundlePluginInterface | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getBundles(ParserInterface $parser) | ||
{ | ||
return [ | ||
BundleConfig::create(ExtendedEditorsBundle::class) | ||
->setLoadAfter([ContaoCoreBundle::class]), | ||
]; | ||
} | ||
} |
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,34 @@ | ||
<?php | ||
/** | ||
* @copyright MEN AT WORK 2018 | ||
* @package extendedEditors | ||
* @license GNU/LGPL | ||
*/ | ||
|
||
namespace MenAtWork\ExtendedEditorsBundle\DependencyInjection; | ||
|
||
use Symfony\Component\Config\FileLocator; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; | ||
|
||
/** | ||
* Adds the bundle services to the container. | ||
* | ||
* @copyright MEN AT WORK 2018 | ||
*/ | ||
class ExtendedEditorsExtension extends Extension | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function load(array $mergedConfig, ContainerBuilder $container) | ||
{ | ||
$loader = new YamlFileLoader( | ||
$container, | ||
new FileLocator(__DIR__.'/../Resources/config') | ||
); | ||
|
||
$loader->load('services.yml'); | ||
} | ||
} |
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,14 @@ | ||
<?php | ||
/** | ||
* @copyright MEN AT WORK 2018 | ||
* @package extendedEditors | ||
* @license GNU/LGPL | ||
*/ | ||
|
||
namespace MenAtWork\ExtendedEditorsBundle; | ||
|
||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
|
||
class ExtendedEditorsBundle extends Bundle | ||
{ | ||
} |
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,3 @@ | ||
services: | ||
maw.extendededitorsbundle.listener.replaceInsertTags: | ||
class: MenAtWork\ExtendedEditorsBundle\Contao\InsertTags |
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,16 @@ | ||
<?php | ||
|
||
/** | ||
* Contao Open Source CMS | ||
* | ||
* @copyright MEN AT WORK 2014 | ||
* @package extendedEditors | ||
* @license GNU/LGPL | ||
* @filesource | ||
*/ | ||
|
||
/** | ||
* Hooks | ||
*/ | ||
$GLOBALS['TL_HOOKS']['replaceInsertTags'][] = array('maw.extendededitorsbundle.listener.replaceInsertTags', 'ReplaceInsertTags'); | ||
$GLOBALS['TL_HOOKS']['replaceInsertTags'][] = array('maw.extendededitorsbundle.listener.replaceInsertTags', 'ReplaceLanguageTags'); |
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,15 @@ | ||
<?php | ||
|
||
/** | ||
* Contao Open Source CMS | ||
* | ||
* @copyright MEN AT WORK 2014 | ||
* @package extendedEditors | ||
* @license GNU/LGPL | ||
* @filesource | ||
*/ | ||
|
||
/** | ||
* Table maw_tl_form_field | ||
*/ | ||
$GLOBALS['TL_DCA']['tl_form_field']['list']['sorting']['child_record_callback'] = array('MenAtWork\ExtendedEditorsBundle\Contao\Table\FormField', 'listFormFields'); |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.