You are here

public static function AdsenseAdInterface::adsenseAdFormats in Google AdSense integration 8

This is the array that holds all ad formats.

All it has is a multi-dimensional array indexed by a key, containing the ad type and the description.

To add a new code:

  • Make sure the key is not in use by a different format
  • Go to Google AdSense . Get the dimensions . Get the description

Parameters

string $key: Ad key for which the format is needed (optional).

Return value

array if no key is provided: array of supported ad formats as an array (type, description). if a key is provided, the array containing the ad format for that key, or NULL if there is no ad with that key.

3 methods override AdsenseAdInterface::adsenseAdFormats()
ManagedAd::adsenseAdFormats in src/Plugin/AdsenseAd/ManagedAd.php
This is the array that holds all ad formats.
OldCodeAd::adsenseAdFormats in oldcode/src/Plugin/AdsenseAd/OldCodeAd.php
This is the array that holds all ad formats.
SearchAdBase::adsenseAdFormats in src/SearchAdBase.php
This is the array that holds all ad formats.

File

src/AdsenseAdInterface.php, line 71

Class

AdsenseAdInterface
Defines an interface for the adsense ad plugins.

Namespace

Drupal\adsense

Code

public static function adsenseAdFormats($key = NULL);