-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
41 changed files
with
424 additions
and
218 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ ignore: | |
- 'Scrutinizer Auto-Fixer <[email protected]>' | ||
|
||
exclude: | ||
- /^contao\/languages/ | ||
- /^src\/Resources\/contao\/languages/ | ||
|
||
mapping: | ||
'Andreas Isaak <[email protected]>': 'Andreas Isaak <[email protected]>' | ||
|
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
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 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,48 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of MetaModels/attribute_text. | ||
* | ||
* (c) 2012-2019 The MetaModels team. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* This project is provided in good faith and hope to be usable by anyone. | ||
* | ||
* @package MetaModels/attribute_text | ||
* @author Christian Schiffler <[email protected]> | ||
* @author Christopher Boelter <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @author David Molineus <[email protected]> | ||
* @copyright 2012-2019 The MetaModels team. | ||
* @license https://github.com/MetaModels/attribute_text/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
||
namespace MetaModels\AttributeTextBundle\Attribute; | ||
|
||
use Doctrine\DBAL\Connection; | ||
use MetaModels\Attribute\AbstractSimpleAttributeTypeFactory; | ||
use MetaModels\Helper\TableManipulator; | ||
|
||
/** | ||
* Attribute type factory for text attributes. | ||
*/ | ||
class AttributeTypeFactory extends AbstractSimpleAttributeTypeFactory | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* | ||
* @param Connection $connection The database connection. | ||
* @param TableManipulator $tableManipulator The table manipulator. | ||
*/ | ||
public function __construct(Connection $connection, TableManipulator $tableManipulator) | ||
{ | ||
parent::__construct($connection, $tableManipulator); | ||
|
||
$this->typeName = 'text'; | ||
$this->typeIcon = 'bundles/metamodelsattributetext/text.png'; | ||
$this->typeClass = Text::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 |
---|---|---|
|
@@ -15,12 +15,13 @@ | |
* @author Andreas Isaak <[email protected]> | ||
* @author Christopher Boelter <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @author David Molineus <[email protected]> | ||
* @copyright 2012-2019 The MetaModels team. | ||
* @license https://github.com/MetaModels/attribute_text/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
||
namespace MetaModels\Attribute\Text; | ||
namespace MetaModels\AttributeTextBundle\Attribute; | ||
|
||
use MetaModels\Attribute\BaseSimple; | ||
|
||
|
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,50 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of MetaModels/attribute_text. | ||
* | ||
* (c) 2012-2019 The MetaModels team. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* This project is provided in good faith and hope to be usable by anyone. | ||
* | ||
* @package MetaModels/attribute_text | ||
* @author Christian Schiffler <[email protected]> | ||
* @author Sven Baumann <[email protected]> | ||
* @author David Molineus <[email protected]> | ||
* @copyright 2012-2019 The MetaModels team. | ||
* @license https://github.com/MetaModels/attribute_text/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
||
namespace MetaModels\AttributeTextBundle\ContaoManager; | ||
|
||
use Contao\ManagerPlugin\Bundle\BundlePluginInterface; | ||
use Contao\ManagerPlugin\Bundle\Config\BundleConfig; | ||
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface; | ||
use MetaModels\AttributeTextBundle\MetaModelsAttributeTextBundle; | ||
use MetaModels\CoreBundle\MetaModelsCoreBundle; | ||
|
||
/** | ||
* Plugin for the Contao Manager. | ||
*/ | ||
class Plugin implements BundlePluginInterface | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getBundles(ParserInterface $parser) | ||
{ | ||
return [ | ||
BundleConfig::create(MetaModelsAttributeTextBundle::class) | ||
->setLoadAfter( | ||
[ | ||
MetaModelsCoreBundle::class | ||
] | ||
) | ||
->setReplace(['metamodelsattribute_text']) | ||
]; | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
src/DependencyInjection/MetaModelsAttributeTextExtension.php
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,41 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of MetaModels/attribute_text. | ||
* | ||
* (c) 2012-2019 The MetaModels team. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* This project is provided in good faith and hope to be usable by anyone. | ||
* | ||
* @package MetaModels/attribute_text | ||
* @author Christian Schiffler <[email protected]> | ||
* @author David Molineus <[email protected]> | ||
* @copyright 2012-2019 The MetaModels team. | ||
* @license https://github.com/MetaModels/attribute_text/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
||
namespace MetaModels\AttributeTextBundle\DependencyInjection; | ||
|
||
use Symfony\Component\Config\FileLocator; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Extension\Extension; | ||
use Symfony\Component\DependencyInjection\Loader; | ||
|
||
/** | ||
* This is the class that loads and manages the bundle configuration | ||
*/ | ||
class MetaModelsAttributeTextExtension extends Extension | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function load(array $configs, ContainerBuilder $container) | ||
{ | ||
$loader = new Loader\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 |
---|---|---|
|
@@ -11,37 +11,24 @@ | |
* This project is provided in good faith and hope to be usable by anyone. | ||
* | ||
* @package MetaModels/attribute_text | ||
* @author Christian Schiffler <[email protected]> | ||
* @author Christopher Boelter <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @author David Molineus <[email protected]> | ||
* @copyright 2012-2019 The MetaModels team. | ||
* @license https://github.com/MetaModels/attribute_text/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
||
namespace MetaModels\Attribute\Text; | ||
namespace MetaModels\AttributeTextBundle\EventListener; | ||
|
||
use ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent; | ||
use MetaModels\DcGeneral\Events\BaseSubscriber; | ||
|
||
/** | ||
* Handles event operations on tl_metamodel_dcasetting. | ||
*/ | ||
class BackendSubscriber extends BaseSubscriber | ||
class BackendEventListener | ||
{ | ||
/** | ||
* Register all listeners to handle creation of a data container. | ||
* | ||
* @return void | ||
*/ | ||
protected function registerEventsInDispatcher() | ||
{ | ||
$this | ||
->addListener( | ||
GetPropertyOptionsEvent::NAME, | ||
array($this, 'getRgxpOptions') | ||
); | ||
} | ||
|
||
/** | ||
* Retrieve the options for the attributes. | ||
* | ||
|
Oops, something went wrong.