You are here

public static function AmpSocialPost::getProviders in Accelerated Mobile Pages (AMP) 8.3

Option list of all providers.

return array Array of names and labels for all supported providers.

3 calls to AmpSocialPost::getProviders()
AmpSocialPost::getProvider in src/Element/AmpSocialPost.php
Find the provider from an url.
AmpSocialPostFormatter::settingsForm in src/Plugin/Field/FieldFormatter/AmpSocialPostFormatter.php
Returns a form to configure settings for the formatter.
AmpSocialPostTest::testGetProviders in tests/src/Unit/AmpSocialPostTest.php
@covers ::getProviders

File

src/Element/AmpSocialPost.php, line 111

Class

AmpSocialPost
Provides AMP social post elements.

Namespace

Drupal\amp\Element

Code

public static function getProviders() {
  return [
    'facebook' => 'Facebook',
    'twitter' => 'Twitter',
    'instagram' => 'Instagram',
    'pinterest' => 'Pinterest',
  ];
}