-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
40 changed files
with
906 additions
and
482 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 |
---|---|---|
|
@@ -2,7 +2,7 @@ ignore: | |
- 'Mini Model <[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,105 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of MetaModels/attribute_translatedurl. | ||
* | ||
* (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_translatedurl | ||
* @author David Molineus <[email protected]> | ||
* @author Christian Schiffler <[email protected]> | ||
* @copyright 2012-2019 The MetaModels team. | ||
* @license https://github.com/MetaModels/attribute_translatedurl/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
||
namespace MetaModels\AttributeTranslatedUrlBundle\Attribute; | ||
|
||
use Doctrine\DBAL\Connection; | ||
use MetaModels\Attribute\IAttributeTypeFactory; | ||
use Symfony\Component\EventDispatcher\EventDispatcherInterface; | ||
|
||
/** | ||
* Attribute type factory for translated url attributes. | ||
*/ | ||
class AttributeTypeFactory implements IAttributeTypeFactory | ||
{ | ||
/** | ||
* Database connection. | ||
* | ||
* @var Connection | ||
*/ | ||
private $connection; | ||
|
||
/** | ||
* Event dispatcher. | ||
* | ||
* @var EventDispatcherInterface | ||
*/ | ||
private $eventDispatcher; | ||
|
||
/** | ||
* Construct. | ||
* | ||
* @param Connection $connection Database connection. | ||
* @param EventDispatcherInterface $eventDispatcher Event dispatcher. | ||
*/ | ||
public function __construct(Connection $connection, EventDispatcherInterface $eventDispatcher) | ||
{ | ||
$this->connection = $connection; | ||
$this->eventDispatcher = $eventDispatcher; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getTypeName() | ||
{ | ||
return 'translatedurl'; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getTypeIcon() | ||
{ | ||
return 'bundles/metamodelsattributetranslatedurl/url.png'; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function createInstance($information, $metaModel) | ||
{ | ||
return new TranslatedUrl($metaModel, $information, $this->connection, $this->eventDispatcher); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function isTranslatedType() | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function isSimpleType() | ||
{ | ||
return false; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function isComplexType() | ||
{ | ||
return true; | ||
} | ||
} |
Oops, something went wrong.