Skip to content
Snippets Groups Projects
Commit 79a92168 authored by Brian Canini's avatar Brian Canini
Browse files

Updating drupal/social_media_links (2.7.0 => 2.8.0)

parent 27894215
No related branches found
No related tags found
No related merge requests found
Showing
with 15728 additions and 16451 deletions
This diff is collapsed.
......@@ -37,8 +37,8 @@
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
......
......@@ -278,7 +278,6 @@
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatInterface' => $vendorDir . '/commerceguys/intl/src/NumberFormat/NumberFormatInterface.php',
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatRepository' => $vendorDir . '/commerceguys/intl/src/NumberFormat/NumberFormatRepository.php',
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatRepositoryInterface' => $vendorDir . '/commerceguys/intl/src/NumberFormat/NumberFormatRepositoryInterface.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Composer\\Installers\\AglInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php',
'Composer\\Installers\\AimeosInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AimeosInstaller.php',
'Composer\\Installers\\AnnotateCmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
......@@ -3195,6 +3194,7 @@
'EasyRdf_Parser_Arc' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Parser/Arc.php',
'EasyRdf_Parser_Exception' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Parser/Exception.php',
'EasyRdf_Parser_Json' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Parser/Json.php',
'EasyRdf_Parser_JsonLd' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Parser/JsonLdImplementation.php',
'EasyRdf_Parser_Ntriples' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Parser/Ntriples.php',
'EasyRdf_Parser_Rapper' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Parser/Rapper.php',
'EasyRdf_Parser_RdfPhp' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfPhp.php',
......@@ -3207,6 +3207,7 @@
'EasyRdf_Serialiser_Arc' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Arc.php',
'EasyRdf_Serialiser_GraphViz' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/GraphViz.php',
'EasyRdf_Serialiser_Json' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Json.php',
'EasyRdf_Serialiser_JsonLd' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/JsonLd_real.php',
'EasyRdf_Serialiser_Ntriples' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Ntriples.php',
'EasyRdf_Serialiser_Rapper' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Rapper.php',
'EasyRdf_Serialiser_RdfPhp' => $vendorDir . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/RdfPhp.php',
......@@ -3680,6 +3681,7 @@
'OomphInc\\ComposerInstallersExtender\\Installers\\Installer' => $vendorDir . '/oomphinc/composer-installers-extender/src/Installers/Installer.php',
'OomphInc\\ComposerInstallersExtender\\Plugin' => $vendorDir . '/oomphinc/composer-installers-extender/src/Plugin.php',
'PEAR' => $vendorDir . '/pear/pear-core-minimal/src/PEAR.php',
'PEAR_Error' => $vendorDir . '/pear/pear-core-minimal/src/PEAR.php',
'PEAR_ErrorStack' => $vendorDir . '/pear/pear-core-minimal/src/PEAR/ErrorStack.php',
'PEAR_Exception' => $vendorDir . '/pear/pear_exception/PEAR/Exception.php',
'PHPMailer\\PHPMailer\\Exception' => $vendorDir . '/phpmailer/phpmailer/src/Exception.php',
......@@ -4626,11 +4628,13 @@
'Symfony\\Cmf\\Component\\Routing\\Event\\RouterGenerateEvent' => $vendorDir . '/symfony-cmf/routing/Event/RouterGenerateEvent.php',
'Symfony\\Cmf\\Component\\Routing\\Event\\RouterMatchEvent' => $vendorDir . '/symfony-cmf/routing/Event/RouterMatchEvent.php',
'Symfony\\Cmf\\Component\\Routing\\LazyRouteCollection' => $vendorDir . '/symfony-cmf/routing/LazyRouteCollection.php',
'Symfony\\Cmf\\Component\\Routing\\LazyRouteCollectionTest' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/LazyRouteCollectionTest.php',
'Symfony\\Cmf\\Component\\Routing\\NestedMatcher\\FinalMatcherInterface' => $vendorDir . '/symfony-cmf/routing/NestedMatcher/FinalMatcherInterface.php',
'Symfony\\Cmf\\Component\\Routing\\NestedMatcher\\NestedMatcher' => $vendorDir . '/symfony-cmf/routing/NestedMatcher/NestedMatcher.php',
'Symfony\\Cmf\\Component\\Routing\\NestedMatcher\\RouteFilterInterface' => $vendorDir . '/symfony-cmf/routing/NestedMatcher/RouteFilterInterface.php',
'Symfony\\Cmf\\Component\\Routing\\NestedMatcher\\UrlMatcher' => $vendorDir . '/symfony-cmf/routing/NestedMatcher/UrlMatcher.php',
'Symfony\\Cmf\\Component\\Routing\\PagedRouteCollection' => $vendorDir . '/symfony-cmf/routing/PagedRouteCollection.php',
'Symfony\\Cmf\\Component\\Routing\\PagedRouteCollectionTest' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/PagedRouteCollectionTest.php',
'Symfony\\Cmf\\Component\\Routing\\PagedRouteProviderInterface' => $vendorDir . '/symfony-cmf/routing/PagedRouteProviderInterface.php',
'Symfony\\Cmf\\Component\\Routing\\ProviderBasedGenerator' => $vendorDir . '/symfony-cmf/routing/ProviderBasedGenerator.php',
'Symfony\\Cmf\\Component\\Routing\\RedirectRouteInterface' => $vendorDir . '/symfony-cmf/routing/RedirectRouteInterface.php',
......@@ -4646,13 +4650,23 @@
'Symfony\\Cmf\\Component\\Routing\\Tests\\Enhancer\\FieldPresenceEnhancerTest' => $vendorDir . '/symfony-cmf/routing/Tests/Enhancer/FieldPresenceEnhancerTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Enhancer\\RouteContentEnhancerTest' => $vendorDir . '/symfony-cmf/routing/Tests/Enhancer/RouteContentEnhancerTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Enhancer\\RouteObject' => $vendorDir . '/symfony-cmf/routing/Tests/Enhancer/RouteObject.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Enhancer\\TargetDocument' => $vendorDir . '/symfony-cmf/routing/Tests/Enhancer/RouteContentEnhancerTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Enhancer\\UnknownDocument' => $vendorDir . '/symfony-cmf/routing/Tests/Enhancer/RouteContentEnhancerTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Mapper\\FieldMapEnhancerTest' => $vendorDir . '/symfony-cmf/routing/Tests/Enhancer/FieldMapEnhancerTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\NestedMatcher\\NestedMatcherTest' => $vendorDir . '/symfony-cmf/routing/Tests/NestedMatcher/NestedMatcherTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\NestedMatcher\\UrlMatcherTest' => $vendorDir . '/symfony-cmf/routing/Tests/NestedMatcher/UrlMatcherTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\ChainRouterTest' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/ChainRouterTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\ContentAwareGeneratorTest' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/ContentAwareGeneratorTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\DynamicRouterTest' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/DynamicRouterTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\ProviderBasedGeneratorTest' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/ProviderBasedGeneratorTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RequestMatcher' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/ChainRouterTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteAware' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/ContentAwareGeneratorTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/RouteMock.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteObject' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/ProviderBasedGeneratorTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\TestableContentAwareGenerator' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/ContentAwareGeneratorTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\TestableProviderBasedGenerator' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/ProviderBasedGeneratorTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\VersatileRouter' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/ChainRouterTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\WarmableRouterMock' => $vendorDir . '/symfony-cmf/routing/Tests/Routing/ChainRouterTest.php',
'Symfony\\Cmf\\Component\\Routing\\VersatileGeneratorInterface' => $vendorDir . '/symfony-cmf/routing/VersatileGeneratorInterface.php',
'Symfony\\Component\\ClassLoader\\ApcClassLoader' => $vendorDir . '/symfony/class-loader/ApcClassLoader.php',
'Symfony\\Component\\ClassLoader\\ClassCollectionLoader' => $vendorDir . '/symfony/class-loader/ClassCollectionLoader.php',
......@@ -4729,6 +4743,8 @@
'Symfony\\Component\\Config\\Resource\\FileResource' => $vendorDir . '/symfony/config/Resource/FileResource.php',
'Symfony\\Component\\Config\\Resource\\GlobResource' => $vendorDir . '/symfony/config/Resource/GlobResource.php',
'Symfony\\Component\\Config\\Resource\\ReflectionClassResource' => $vendorDir . '/symfony/config/Resource/ReflectionClassResource.php',
'Symfony\\Component\\Config\\Resource\\ReflectionMethodHhvmWrapper' => $vendorDir . '/symfony/config/Resource/ReflectionClassResource.php',
'Symfony\\Component\\Config\\Resource\\ReflectionParameterHhvmWrapper' => $vendorDir . '/symfony/config/Resource/ReflectionClassResource.php',
'Symfony\\Component\\Config\\Resource\\ResourceInterface' => $vendorDir . '/symfony/config/Resource/ResourceInterface.php',
'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceChecker' => $vendorDir . '/symfony/config/Resource/SelfCheckingResourceChecker.php',
'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceInterface' => $vendorDir . '/symfony/config/Resource/SelfCheckingResourceInterface.php',
......@@ -4905,6 +4921,8 @@
'Symfony\\Component\\DependencyInjection\\Compiler\\FactoryReturnTypePass' => $vendorDir . '/symfony/dependency-injection/Compiler/FactoryReturnTypePass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\InlineServiceDefinitionsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\LoggingFormatter' => $vendorDir . '/symfony/dependency-injection/Compiler/LoggingFormatter.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationContainerBuilder' => $vendorDir . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationParameterBag' => $vendorDir . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationPass' => $vendorDir . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\PassConfig' => $vendorDir . '/symfony/dependency-injection/Compiler/PassConfig.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\PriorityTaggedServiceTrait' => $vendorDir . '/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php',
......@@ -5014,6 +5032,7 @@
'Symfony\\Component\\DependencyInjection\\Loader\\GlobFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/GlobFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\IniFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/IniFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\PhpFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/PhpFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\ProtectedPhpFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/PhpFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/XmlFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/YamlFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Parameter' => $vendorDir . '/symfony/dependency-injection/Parameter.php',
......@@ -5043,6 +5062,7 @@
'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php',
'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php',
'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => $vendorDir . '/symfony/event-dispatcher/Debug/WrappedListener.php',
'Symfony\\Component\\EventDispatcher\\DependencyInjection\\ExtractingEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => $vendorDir . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
'Symfony\\Component\\EventDispatcher\\Event' => $vendorDir . '/symfony/event-dispatcher/Event.php',
'Symfony\\Component\\EventDispatcher\\EventDispatcher' => $vendorDir . '/symfony/event-dispatcher/EventDispatcher.php',
......@@ -5328,6 +5348,7 @@
'Symfony\\Component\\Routing\\Loader\\GlobFileLoader' => $vendorDir . '/symfony/routing/Loader/GlobFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\ObjectRouteLoader' => $vendorDir . '/symfony/routing/Loader/ObjectRouteLoader.php',
'Symfony\\Component\\Routing\\Loader\\PhpFileLoader' => $vendorDir . '/symfony/routing/Loader/PhpFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\ProtectedPhpFileLoader' => $vendorDir . '/symfony/routing/Loader/PhpFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\XmlFileLoader' => $vendorDir . '/symfony/routing/Loader/XmlFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/routing/Loader/YamlFileLoader.php',
'Symfony\\Component\\Routing\\Matcher\\Dumper\\DumperCollection' => $vendorDir . '/symfony/routing/Matcher/Dumper/DumperCollection.php',
......@@ -5647,6 +5668,7 @@
'Symfony\\Component\\Validator\\Mapping\\TraversalStrategy' => $vendorDir . '/symfony/validator/Mapping/TraversalStrategy.php',
'Symfony\\Component\\Validator\\ObjectInitializerInterface' => $vendorDir . '/symfony/validator/ObjectInitializerInterface.php',
'Symfony\\Component\\Validator\\Test\\ConstraintValidatorTestCase' => $vendorDir . '/symfony/validator/Test/ConstraintValidatorTestCase.php',
'Symfony\\Component\\Validator\\Test\\ConstraintViolationAssertion' => $vendorDir . '/symfony/validator/Test/ConstraintValidatorTestCase.php',
'Symfony\\Component\\Validator\\Test\\ForwardCompatTestTrait' => $vendorDir . '/symfony/validator/Test/ForwardCompatTestTrait.php',
'Symfony\\Component\\Validator\\Util\\PropertyPath' => $vendorDir . '/symfony/validator/Util/PropertyPath.php',
'Symfony\\Component\\Validator\\Validation' => $vendorDir . '/symfony/validator/Validation.php',
......
......@@ -22,8 +22,6 @@ public static function getLoader()
return self::$loader;
}
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit5c689ffcd54b9e495ed983fdce09b530', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit5c689ffcd54b9e495ed983fdce09b530', 'loadClassLoader'));
......@@ -34,7 +32,7 @@ public static function getLoader()
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530::getInitializer($loader));
} else {
......
......@@ -1068,7 +1068,6 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatInterface' => __DIR__ . '/..' . '/commerceguys/intl/src/NumberFormat/NumberFormatInterface.php',
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatRepository' => __DIR__ . '/..' . '/commerceguys/intl/src/NumberFormat/NumberFormatRepository.php',
'CommerceGuys\\Intl\\NumberFormat\\NumberFormatRepositoryInterface' => __DIR__ . '/..' . '/commerceguys/intl/src/NumberFormat/NumberFormatRepositoryInterface.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Composer\\Installers\\AglInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AglInstaller.php',
'Composer\\Installers\\AimeosInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AimeosInstaller.php',
'Composer\\Installers\\AnnotateCmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
......@@ -3985,6 +3984,7 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'EasyRdf_Parser_Arc' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Parser/Arc.php',
'EasyRdf_Parser_Exception' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Parser/Exception.php',
'EasyRdf_Parser_Json' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Parser/Json.php',
'EasyRdf_Parser_JsonLd' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Parser/JsonLdImplementation.php',
'EasyRdf_Parser_Ntriples' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Parser/Ntriples.php',
'EasyRdf_Parser_Rapper' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Parser/Rapper.php',
'EasyRdf_Parser_RdfPhp' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfPhp.php',
......@@ -3997,6 +3997,7 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'EasyRdf_Serialiser_Arc' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Arc.php',
'EasyRdf_Serialiser_GraphViz' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/GraphViz.php',
'EasyRdf_Serialiser_Json' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Json.php',
'EasyRdf_Serialiser_JsonLd' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/JsonLd_real.php',
'EasyRdf_Serialiser_Ntriples' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Ntriples.php',
'EasyRdf_Serialiser_Rapper' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Rapper.php',
'EasyRdf_Serialiser_RdfPhp' => __DIR__ . '/..' . '/easyrdf/easyrdf/lib/EasyRdf/Serialiser/RdfPhp.php',
......@@ -4470,6 +4471,7 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'OomphInc\\ComposerInstallersExtender\\Installers\\Installer' => __DIR__ . '/..' . '/oomphinc/composer-installers-extender/src/Installers/Installer.php',
'OomphInc\\ComposerInstallersExtender\\Plugin' => __DIR__ . '/..' . '/oomphinc/composer-installers-extender/src/Plugin.php',
'PEAR' => __DIR__ . '/..' . '/pear/pear-core-minimal/src/PEAR.php',
'PEAR_Error' => __DIR__ . '/..' . '/pear/pear-core-minimal/src/PEAR.php',
'PEAR_ErrorStack' => __DIR__ . '/..' . '/pear/pear-core-minimal/src/PEAR/ErrorStack.php',
'PEAR_Exception' => __DIR__ . '/..' . '/pear/pear_exception/PEAR/Exception.php',
'PHPMailer\\PHPMailer\\Exception' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/Exception.php',
......@@ -5416,11 +5418,13 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'Symfony\\Cmf\\Component\\Routing\\Event\\RouterGenerateEvent' => __DIR__ . '/..' . '/symfony-cmf/routing/Event/RouterGenerateEvent.php',
'Symfony\\Cmf\\Component\\Routing\\Event\\RouterMatchEvent' => __DIR__ . '/..' . '/symfony-cmf/routing/Event/RouterMatchEvent.php',
'Symfony\\Cmf\\Component\\Routing\\LazyRouteCollection' => __DIR__ . '/..' . '/symfony-cmf/routing/LazyRouteCollection.php',
'Symfony\\Cmf\\Component\\Routing\\LazyRouteCollectionTest' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/LazyRouteCollectionTest.php',
'Symfony\\Cmf\\Component\\Routing\\NestedMatcher\\FinalMatcherInterface' => __DIR__ . '/..' . '/symfony-cmf/routing/NestedMatcher/FinalMatcherInterface.php',
'Symfony\\Cmf\\Component\\Routing\\NestedMatcher\\NestedMatcher' => __DIR__ . '/..' . '/symfony-cmf/routing/NestedMatcher/NestedMatcher.php',
'Symfony\\Cmf\\Component\\Routing\\NestedMatcher\\RouteFilterInterface' => __DIR__ . '/..' . '/symfony-cmf/routing/NestedMatcher/RouteFilterInterface.php',
'Symfony\\Cmf\\Component\\Routing\\NestedMatcher\\UrlMatcher' => __DIR__ . '/..' . '/symfony-cmf/routing/NestedMatcher/UrlMatcher.php',
'Symfony\\Cmf\\Component\\Routing\\PagedRouteCollection' => __DIR__ . '/..' . '/symfony-cmf/routing/PagedRouteCollection.php',
'Symfony\\Cmf\\Component\\Routing\\PagedRouteCollectionTest' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/PagedRouteCollectionTest.php',
'Symfony\\Cmf\\Component\\Routing\\PagedRouteProviderInterface' => __DIR__ . '/..' . '/symfony-cmf/routing/PagedRouteProviderInterface.php',
'Symfony\\Cmf\\Component\\Routing\\ProviderBasedGenerator' => __DIR__ . '/..' . '/symfony-cmf/routing/ProviderBasedGenerator.php',
'Symfony\\Cmf\\Component\\Routing\\RedirectRouteInterface' => __DIR__ . '/..' . '/symfony-cmf/routing/RedirectRouteInterface.php',
......@@ -5436,13 +5440,23 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'Symfony\\Cmf\\Component\\Routing\\Tests\\Enhancer\\FieldPresenceEnhancerTest' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Enhancer/FieldPresenceEnhancerTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Enhancer\\RouteContentEnhancerTest' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Enhancer/RouteContentEnhancerTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Enhancer\\RouteObject' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Enhancer/RouteObject.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Enhancer\\TargetDocument' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Enhancer/RouteContentEnhancerTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Enhancer\\UnknownDocument' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Enhancer/RouteContentEnhancerTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Mapper\\FieldMapEnhancerTest' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Enhancer/FieldMapEnhancerTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\NestedMatcher\\NestedMatcherTest' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/NestedMatcher/NestedMatcherTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\NestedMatcher\\UrlMatcherTest' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/NestedMatcher/UrlMatcherTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\ChainRouterTest' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/ChainRouterTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\ContentAwareGeneratorTest' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/ContentAwareGeneratorTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\DynamicRouterTest' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/DynamicRouterTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\ProviderBasedGeneratorTest' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/ProviderBasedGeneratorTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RequestMatcher' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/ChainRouterTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteAware' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/ContentAwareGeneratorTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/RouteMock.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteObject' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/ProviderBasedGeneratorTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\TestableContentAwareGenerator' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/ContentAwareGeneratorTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\TestableProviderBasedGenerator' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/ProviderBasedGeneratorTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\VersatileRouter' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/ChainRouterTest.php',
'Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\WarmableRouterMock' => __DIR__ . '/..' . '/symfony-cmf/routing/Tests/Routing/ChainRouterTest.php',
'Symfony\\Cmf\\Component\\Routing\\VersatileGeneratorInterface' => __DIR__ . '/..' . '/symfony-cmf/routing/VersatileGeneratorInterface.php',
'Symfony\\Component\\ClassLoader\\ApcClassLoader' => __DIR__ . '/..' . '/symfony/class-loader/ApcClassLoader.php',
'Symfony\\Component\\ClassLoader\\ClassCollectionLoader' => __DIR__ . '/..' . '/symfony/class-loader/ClassCollectionLoader.php',
......@@ -5519,6 +5533,8 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'Symfony\\Component\\Config\\Resource\\FileResource' => __DIR__ . '/..' . '/symfony/config/Resource/FileResource.php',
'Symfony\\Component\\Config\\Resource\\GlobResource' => __DIR__ . '/..' . '/symfony/config/Resource/GlobResource.php',
'Symfony\\Component\\Config\\Resource\\ReflectionClassResource' => __DIR__ . '/..' . '/symfony/config/Resource/ReflectionClassResource.php',
'Symfony\\Component\\Config\\Resource\\ReflectionMethodHhvmWrapper' => __DIR__ . '/..' . '/symfony/config/Resource/ReflectionClassResource.php',
'Symfony\\Component\\Config\\Resource\\ReflectionParameterHhvmWrapper' => __DIR__ . '/..' . '/symfony/config/Resource/ReflectionClassResource.php',
'Symfony\\Component\\Config\\Resource\\ResourceInterface' => __DIR__ . '/..' . '/symfony/config/Resource/ResourceInterface.php',
'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceChecker' => __DIR__ . '/..' . '/symfony/config/Resource/SelfCheckingResourceChecker.php',
'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceInterface' => __DIR__ . '/..' . '/symfony/config/Resource/SelfCheckingResourceInterface.php',
......@@ -5695,6 +5711,8 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'Symfony\\Component\\DependencyInjection\\Compiler\\FactoryReturnTypePass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/FactoryReturnTypePass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\InlineServiceDefinitionsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\LoggingFormatter' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/LoggingFormatter.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationContainerBuilder' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationParameterBag' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\PassConfig' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/PassConfig.php',
'Symfony\\Component\\DependencyInjection\\Compiler\\PriorityTaggedServiceTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php',
......@@ -5804,6 +5822,7 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'Symfony\\Component\\DependencyInjection\\Loader\\GlobFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/GlobFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\IniFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/IniFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\PhpFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/PhpFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\ProtectedPhpFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/PhpFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/XmlFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/YamlFileLoader.php',
'Symfony\\Component\\DependencyInjection\\Parameter' => __DIR__ . '/..' . '/symfony/dependency-injection/Parameter.php',
......@@ -5833,6 +5852,7 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php',
'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcherInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php',
'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/WrappedListener.php',
'Symfony\\Component\\EventDispatcher\\DependencyInjection\\ExtractingEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => __DIR__ . '/..' . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
'Symfony\\Component\\EventDispatcher\\Event' => __DIR__ . '/..' . '/symfony/event-dispatcher/Event.php',
'Symfony\\Component\\EventDispatcher\\EventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventDispatcher.php',
......@@ -6118,6 +6138,7 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'Symfony\\Component\\Routing\\Loader\\GlobFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/GlobFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\ObjectRouteLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/ObjectRouteLoader.php',
'Symfony\\Component\\Routing\\Loader\\PhpFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/PhpFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\ProtectedPhpFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/PhpFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\XmlFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/XmlFileLoader.php',
'Symfony\\Component\\Routing\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/YamlFileLoader.php',
'Symfony\\Component\\Routing\\Matcher\\Dumper\\DumperCollection' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/DumperCollection.php',
......@@ -6437,6 +6458,7 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530
'Symfony\\Component\\Validator\\Mapping\\TraversalStrategy' => __DIR__ . '/..' . '/symfony/validator/Mapping/TraversalStrategy.php',
'Symfony\\Component\\Validator\\ObjectInitializerInterface' => __DIR__ . '/..' . '/symfony/validator/ObjectInitializerInterface.php',
'Symfony\\Component\\Validator\\Test\\ConstraintValidatorTestCase' => __DIR__ . '/..' . '/symfony/validator/Test/ConstraintValidatorTestCase.php',
'Symfony\\Component\\Validator\\Test\\ConstraintViolationAssertion' => __DIR__ . '/..' . '/symfony/validator/Test/ConstraintValidatorTestCase.php',
'Symfony\\Component\\Validator\\Test\\ForwardCompatTestTrait' => __DIR__ . '/..' . '/symfony/validator/Test/ForwardCompatTestTrait.php',
'Symfony\\Component\\Validator\\Util\\PropertyPath' => __DIR__ . '/..' . '/symfony/validator/Util/PropertyPath.php',
'Symfony\\Component\\Validator\\Validation' => __DIR__ . '/..' . '/symfony/validator/Validation.php',
......
This diff is collapsed.
......@@ -28,11 +28,12 @@ Install as normal (see http://drupal.org/documentation/install/modules-themes).
CONFIGURATION
============
------------
The module has no special configuration. All settings are available in the
block settings: /admin/structure/block
MAINTAINERS
-----------
Neslee Canil Pinto: https://www.drupal.org/u/neslee-canil-pinto
* Neslee Canil Pinto: https://www.drupal.org/u/neslee-canil-pinto
* Christian Beier: https://www.drupal.org/u/cbeier
......@@ -9,6 +9,11 @@
"name": "Neslee Canil Pinto",
"homepage": "https://www.drupal.org/u/neslee-canil-pinto",
"role": "Maintainer"
},
{
"name": "Christian Beier",
"homepage": "https://www.drupal.org/u/cbeier",
"role": "Maintainer"
}
],
"support": {
......
......@@ -7,7 +7,7 @@ core_version_requirement: ^8 || ^9
dependencies:
- social_media_links:social_media_links
# Information added by Drupal.org packaging script on 2020-07-24
version: '8.x-2.7'
# Information added by Drupal.org packaging script on 2021-03-08
version: '8.x-2.8'
project: 'social_media_links'
datestamp: 1595616930
datestamp: 1615222641
......@@ -109,7 +109,12 @@ protected static function platformElements(array $element, array $value) {
'#default_value' => isset($value['value']) ? $value['value'] : '',
'#field_prefix' => $selected_platform['instance']->getUrlPrefix(),
'#field_suffix' => $selected_platform['instance']->getUrlSuffix(),
'#element_validate' => [[get_class($selected_platform['instance']), 'validateValue']],
'#element_validate' => [
[
get_class($selected_platform['instance']),
'validateValue',
],
],
];
if (!empty($selected_platform['instance']->getFieldDescription())) {
$element['value']['#description'] = $selected_platform['instance']->getFieldDescription();
......
......@@ -7,6 +7,7 @@
use Drupal\Core\Form\FormStateInterface;
use Drupal\social_media_links\IconsetBase;
use Drupal\Core\Template\Attribute;
use Drupal\Core\StringTranslation\StringTranslationTrait;
/**
* Plugin implementation of the 'social_media_links_field_default' formatter.
......@@ -21,6 +22,8 @@
*/
class SocialMediaLinksFieldDefaultFormatter extends FormatterBase {
use StringTranslationTrait;
/**
* {@inheritdoc}
*/
......@@ -149,11 +152,11 @@ public function settingsSummary() {
$config['appearance']['show_name'] = 0;
}
$orientation = $config['appearance']['orientation'] == 'v' ? t('vertical') : t('horizontal');
$summary[] = t('Orientation: @orientation', ['@orientation' => $orientation]);
$orientation = $config['appearance']['orientation'] == 'v' ? $this->t('vertical') : $this->t('horizontal');
$summary[] = $this->t('Orientation: @orientation', ['@orientation' => $orientation]);
$show_name = (isset($config['appearance']['show_name']) && $config['appearance']['show_name']) ? t('Yes') : t('No');
$summary[] = t('Show name: @show_name', ['@show_name' => $show_name]);
$show_name = (isset($config['appearance']['show_name']) && $config['appearance']['show_name']) ? $this->t('Yes') : $this->t('No');
$summary[] = $this->t('Show name: @show_name', ['@show_name' => $show_name]);
return $summary;
}
......@@ -176,7 +179,7 @@ protected function getPlatformsWithValues(FieldItemListInterface $items) {
}
$platforms = [];
foreach ($items as $delta => $item) {
foreach ($items as $item) {
// We have two possible structures where the platform values can be
// stored.
// * If the select widget was used the values are saved in two fields
......
......@@ -139,7 +139,10 @@ public function fieldSettingsForm(array $form, FormStateInterface $form_state) {
'#title_display' => 'invisible',
'#default_value' => $platform['weight'],
'#attributes' => [
'class' => ['platform-order-weight', 'platform-order-weight-' . $platform_id],
'class' => [
'platform-order-weight',
'platform-order-weight-' . $platform_id,
],
],
// Delta: We need to use the max weight + number of platforms,
// because if they get re-ordered it could start the count again from
......
......@@ -5,7 +5,7 @@
use Drupal\Core\Field\WidgetBase;
/**
* Class SocialMediaLinksFieldBaseWidget.
* It allows to link social media.
*/
abstract class SocialMediaLinksFieldBaseWidget extends WidgetBase {
......@@ -54,7 +54,10 @@ protected function getAvailablePlatforms() {
}
}
uasort($available_platforms, ['Drupal\Component\Utility\SortArray', 'sortByWeightElement']);
uasort($available_platforms, [
'Drupal\Component\Utility\SortArray',
'sortByWeightElement',
]);
return $available_platforms;
}
......
......@@ -23,7 +23,7 @@ class SocialMediaLinksFieldDefaultWidget extends SocialMediaLinksFieldBaseWidget
*/
public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
$item = $items[$delta];
$value = $item->getEntity()->isNew() ? [] : $item->toArray();
$value = $item->toArray();
$element += [
'#type' => 'details',
......@@ -39,7 +39,12 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
'#default_value' => isset($value['platform_values'][$platform_id]['value']) ? $value['platform_values'][$platform_id]['value'] : '',
'#field_prefix' => $platform['instance']->getUrlPrefix(),
'#field_suffix' => $platform['instance']->getUrlSuffix(),
'#element_validate' => [[get_class($platform['instance']), 'validateValue']],
'#element_validate' => [
[
get_class($platform['instance']),
'validateValue',
],
],
];
if (!empty($platform['instance']->getFieldDescription())) {
$element['platform_values'][$platform_id]['value']['#description'] = $platform['instance']->getFieldDescription();
......
......@@ -4,7 +4,7 @@ type: module
core: 8.x
core_version_requirement: ^8 || ^9
# Information added by Drupal.org packaging script on 2020-07-24
version: '8.x-2.7'
# Information added by Drupal.org packaging script on 2021-03-08
version: '8.x-2.8'
project: 'social_media_links'
datestamp: 1595616930
datestamp: 1615222641
......@@ -6,4 +6,4 @@ social_media_links.theme:
fontawesome.component:
css:
component:
//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css: { type: external }
//maxcdn.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css: { type: external }
......@@ -21,6 +21,20 @@ function social_media_links_theme($existing, $type, $theme, $path) {
];
}
/**
* Implements hook_theme_suggestions_HOOK() for "social_media_links_platforms".
*/
function social_media_links_theme_suggestions_social_media_links_platforms(array $variables) {
$suggestions = [];
// If there is a custom suggestion add it to our base suggestion.
if (!empty($variables['appearance']['suggestion'])) {
$suggestions[] = 'social_media_links_platforms__' . $variables['appearance']['suggestion'];
}
return $suggestions;
}
/**
* Implements hook_preprocess_HOOK() for block.html.twig.
*/
......
......@@ -128,7 +128,12 @@ public function blockForm($form, FormStateInterface $form_state) {
'#default_value' => isset($config['platforms'][$platform_id]['value']) ? $config['platforms'][$platform_id]['value'] : '',
'#field_prefix' => $platform['instance']->getUrlPrefix(),
'#field_suffix' => $platform['instance']->getUrlSuffix(),
'#element_validate' => [[get_class($platform['instance']), 'validateValue']],
'#element_validate' => [
[
get_class($platform['instance']),
'validateValue',
],
],
];
if (!empty($platform['instance']->getFieldDescription())) {
$form['platforms'][$platform_id]['value']['#description'] = $platform['instance']->getFieldDescription();
......@@ -177,6 +182,18 @@ public function blockForm($form, FormStateInterface $form_state) {
'#description' => $this->t('Show the platform name next to the icon.'),
'#default_value' => isset($config['appearance']['show_name']) ? $config['appearance']['show_name'] : 0,
];
$form['appearance']['suggestion'] = [
'#type' => 'machine_name',
'#title' => $this->t('Theme hook suggestion'),
'#default_value' => isset($config['appearance']['suggestion']) ? $config['appearance']['suggestion'] : '',
'#required' => FALSE,
'#field_prefix' => '<code>social_media_links_platforms__</code>',
'#description' => $this->t('A theme hook suggestion can be used to override the default HTML and CSS found in <code>social-media-links-platforms.html</code>.'),
'#machine_name' => [
'error' => $this->t('The theme hook suggestion must contain only lowercase letters, numbers, and underscores.'),
'exists' => [$this, 'suggestionExists'],
],
];
// Link Attributes.
$form['link_attributes'] = [
......@@ -291,7 +308,7 @@ public function blockForm($form, FormStateInterface $form_state) {
foreach ($installDirs as $dir) {
$installDirsIconset[] = $dir . '/' . $iconset_id;
}
$examples .= '<br /><code>' . preg_replace('/,([^,]+) ?$/', " " . $this->t('or') . " $1", implode(',<br />', $installDirsIconset), 1) . '</code>';
$examples .= '<br /><code>' . preg_replace('/,([^,]+) ?$/', " " . 'or' . " $1", implode(',<br />', $installDirsIconset), 1) . '</code>';
$installedIconsets[$iconset_id]['examples'] = [
'#markup' => $examples,
......@@ -303,7 +320,10 @@ public function blockForm($form, FormStateInterface $form_state) {
}
// Sort the array so that installed iconsets shown first.
uasort($installedIconsets, ['Drupal\Component\Utility\SortArray', 'sortByWeightProperty']);
uasort($installedIconsets, [
'Drupal\Component\Utility\SortArray',
'sortByWeightProperty',
]);
$form['iconset']['installed_iconsets'] = [
'#type' => 'table',
......@@ -369,8 +389,8 @@ public function build() {
$platforms[$platform_id]['attributes'] = new Attribute($config['link_attributes']);
if (!empty($platform['instance']->getDescription())) {
$platforms[$platform_id]['attributes']->setAttribute('aria-label', $this->t($platform['instance']->getDescription()));
$platforms[$platform_id]['attributes']->setAttribute('title', $this->t(($platform['instance']->getDescription())));
$platforms[$platform_id]['attributes']->setAttribute('aria-label', $platform['instance']->getDescription());
$platforms[$platform_id]['attributes']->setAttribute('title', $platform['instance']->getDescription());
}
}
......@@ -390,4 +410,14 @@ public function build() {
return [$output];
}
/**
* Checks for an existing theme hook suggestion.
*
* @return bool
* Returns FALSE because there is no need of validation by unique value.
*/
public function suggestionExists() {
return FALSE;
}
}
<?php
namespace Drupal\social_media_links\Plugin\SocialMediaLinks\Platform;
use Drupal\social_media_links\PlatformBase;
/**
* Provides 'gitlab' platform.
*
* @Platform(
* id = "gitlab",
* name = @Translation("GitLab"),
* urlPrefix = "https://gitlab.com/",
* )
*/
class GitLab extends PlatformBase {}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment