public function AdsenseAdBase::__construct in Google AdSense integration 8
Creates a new AdsenseAdBase instance.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin_id for the plugin instance.
mixed|null $plugin_definition: The plugin implementation definition.
\Drupal\Core\Config\ConfigFactoryInterface|null $config_factory: The config factory.
\Drupal\Core\Extension\ModuleHandlerInterface|null $module_handler: The module handler.
\Drupal\Core\Session\AccountProxyInterface|null $current_user: The current user.
Overrides PluginBase::__construct
5 calls to AdsenseAdBase::__construct()
- CustomSearchAd::__construct in src/
Plugin/ AdsenseAd/ CustomSearchAd.php - Creates a new AdsenseAdBase instance.
- CustomSearchV2Ad::__construct in src/
Plugin/ AdsenseAd/ CustomSearchV2Ad.php - Creates a new AdsenseAdBase instance.
- ManagedAd::__construct in src/
Plugin/ AdsenseAd/ ManagedAd.php - Creates a new AdsenseAdBase instance.
- OldCodeAd::__construct in oldcode/
src/ Plugin/ AdsenseAd/ OldCodeAd.php - Creates a new AdsenseAdBase instance.
- OldSearchAd::__construct in oldcode/
src/ Plugin/ AdsenseAd/ OldSearchAd.php - Creates a new AdsenseAdBase instance.
5 methods override AdsenseAdBase::__construct()
- CustomSearchAd::__construct in src/
Plugin/ AdsenseAd/ CustomSearchAd.php - Creates a new AdsenseAdBase instance.
- CustomSearchV2Ad::__construct in src/
Plugin/ AdsenseAd/ CustomSearchV2Ad.php - Creates a new AdsenseAdBase instance.
- ManagedAd::__construct in src/
Plugin/ AdsenseAd/ ManagedAd.php - Creates a new AdsenseAdBase instance.
- OldCodeAd::__construct in oldcode/
src/ Plugin/ AdsenseAd/ OldCodeAd.php - Creates a new AdsenseAdBase instance.
- OldSearchAd::__construct in oldcode/
src/ Plugin/ AdsenseAd/ OldSearchAd.php - Creates a new AdsenseAdBase instance.
File
- src/
AdsenseAdBase.php, line 56
Class
- AdsenseAdBase
- Base class for the AdsenseAd plugins.
Namespace
Drupal\adsenseCode
public function __construct(array $configuration, $plugin_id = '', $plugin_definition = NULL, ConfigFactoryInterface $config_factory = NULL, ModuleHandlerInterface $module_handler = NULL, AccountProxyInterface $current_user = NULL) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->configFactory = $config_factory ?: \Drupal::configFactory();
$this->moduleHandler = $module_handler ?: \Drupal::moduleHandler();
$this->currentUser = $current_user ?: \Drupal::currentUser();
}