You are here

private static function ManagedAd::isResponsive in Google AdSense integration 8

Helper function to determine if an ad format is responsive.

Parameters

string $format: Ad format.

Return value

bool TRUE if the ad is responsive.

2 calls to ManagedAd::isResponsive()
ManagedAd::getAdContent in src/Plugin/AdsenseAd/ManagedAd.php
Return the ad content.
ManagedAd::getAdPlaceholder in src/Plugin/AdsenseAd/ManagedAd.php
Return the ad placeholder.

File

src/Plugin/AdsenseAd/ManagedAd.php, line 176

Class

ManagedAd
Provides an AdSense managed ad unit.

Namespace

Drupal\adsense\Plugin\AdsenseAd

Code

private static function isResponsive($format) {
  return in_array($format, [
    'responsive',
    'link',
    'autorelaxed',
  ]);
}