-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
32 additions
and
25 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 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2023 Contao Community Alliance. | ||
* (c) 2013-2024 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -13,7 +13,7 @@ | |
* @package contao-community-alliance/dc-general | ||
* @author Sven Baumann <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @copyright 2013-2023 Contao Community Alliance. | ||
* @copyright 2013-2024 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -34,7 +34,7 @@ class SessionStorageFactory | |
* | ||
* @var ContainerInterface | ||
*/ | ||
private $container; | ||
private ContainerInterface $container; | ||
|
||
/** | ||
* SessionStorageFactory constructor. | ||
|
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 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2022 Contao Community Alliance. | ||
* (c) 2013-2024 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -13,7 +13,7 @@ | |
* @package contao-community-alliance/dc-general | ||
* @author Sven Baumann <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @copyright 2013-2022 Contao Community Alliance. | ||
* @copyright 2013-2024 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -24,6 +24,7 @@ | |
use Contao\CoreBundle\Picker\PickerConfig; | ||
use Contao\CoreBundle\Picker\PickerProviderInterface; | ||
use Knp\Menu\FactoryInterface; | ||
use Knp\Menu\ItemInterface; | ||
use Symfony\Component\Routing\RouterInterface; | ||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; | ||
use Symfony\Contracts\Translation\TranslatorInterface; | ||
|
@@ -78,15 +79,15 @@ public function __construct(FactoryInterface $menuFactory, RouterInterface $rout | |
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getUrl(PickerConfig $config) | ||
public function getUrl(PickerConfig $config): string | ||
{ | ||
return $this->generateUrl($config, false); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function createMenuItem(PickerConfig $config) | ||
public function createMenuItem(PickerConfig $config): ItemInterface | ||
{ | ||
$name = $this->getName(); | ||
return $this->menuFactory->createItem( | ||
|
@@ -115,7 +116,7 @@ public function setTokenStorage(TokenStorageInterface $tokenStorage) | |
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function isCurrent(PickerConfig $config) | ||
public function isCurrent(PickerConfig $config): bool | ||
{ | ||
return $config->getCurrent() === $this->getName(); | ||
} | ||
|
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2019 Contao Community Alliance. | ||
* (c) 2013-2024 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -12,7 +12,8 @@ | |
* | ||
* @package contao-community-alliance/dc-general | ||
* @author Sven Baumann <[email protected]> | ||
* @copyright 2013-2019 Contao Community Alliance. | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @copyright 2013-2024 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -30,7 +31,7 @@ class TreePickerProvider extends AbstractAwarePickerProvider implements DcaPicke | |
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getName() | ||
public function getName(): string | ||
{ | ||
return 'ccaTreePicker'; | ||
} | ||
|
@@ -46,7 +47,7 @@ public function supportsContext($context) | |
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function supportsValue(PickerConfig $config) | ||
public function supportsValue(PickerConfig $config): bool | ||
{ | ||
if ('cca_tree' === $config->getContext()) { | ||
return is_numeric($config->getValue()); | ||
|
@@ -58,15 +59,15 @@ public function supportsValue(PickerConfig $config) | |
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getDcaTable() | ||
public function getDcaTable(): string | ||
{ | ||
return 'tl_page'; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getDcaAttributes(PickerConfig $config) | ||
public function getDcaAttributes(PickerConfig $config): array | ||
{ | ||
$value = $config->getValue(); | ||
$attributes = ['fieldType' => 'radio']; | ||
|
@@ -97,7 +98,7 @@ public function getDcaAttributes(PickerConfig $config) | |
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function convertDcaValue(PickerConfig $config, $value) | ||
public function convertDcaValue(PickerConfig $config, $value): string|int | ||
{ | ||
if ('cca_tree' === $config->getContext()) { | ||
return (int) $value; | ||
|
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2023 Contao Community Alliance. | ||
* (c) 2013-2024 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -16,7 +16,7 @@ | |
* @author David Molineus <[email protected]> | ||
* @author Sven Baumann <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @copyright 2013-2023 Contao Community Alliance. | ||
* @copyright 2013-2024 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -67,7 +67,7 @@ public function __construct(RequestScopeDeterminator $scopeDeterminator) | |
/** | ||
* {@inheritdoc} | ||
*/ | ||
public static function getSubscribedEvents() | ||
public static function getSubscribedEvents(): array | ||
{ | ||
return [ | ||
DcGeneralEvents::ACTION => [['handleAction', 500]] | ||
|
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2019 Contao Community Alliance. | ||
* (c) 2013-2024 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -14,7 +14,8 @@ | |
* @author Sven Baumann <[email protected]> | ||
* @author Christian Schiffler <[email protected]> | ||
* @author Richard Henkenjohann <[email protected]> | ||
* @copyright 2013-2019 Contao Community Alliance. | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @copyright 2013-2024 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -41,7 +42,7 @@ class Plugin implements BundlePluginInterface, RoutingPluginInterface | |
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getBundles(ParserInterface $parser) | ||
public function getBundles(ParserInterface $parser): array | ||
{ | ||
return [ | ||
BundleConfig::create(CcaDcGeneralBundle::class) | ||
|
@@ -62,6 +63,7 @@ public function getRouteCollection(LoaderResolverInterface $resolver, KernelInte | |
{ | ||
$loader = $resolver->resolve(__DIR__ . '/../Resources/config/routing.yml'); | ||
assert($loader instanceof LoaderInterface); | ||
|
||
return $loader->load(__DIR__ . '/../Resources/config/routing.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