AcquiaCloudSiteHeader.php in Acquia Purge 8
File
src/Plugin/Purge/TagsHeader/AcquiaCloudSiteHeader.php
View source
<?php
namespace Drupal\acquia_purge\Plugin\Purge\TagsHeader;
use Drupal\acquia_purge\AcquiaCloud\PlatformInfoInterface;
use Drupal\purge\Plugin\Purge\TagsHeader\TagsHeaderBase;
use Drupal\purge\Plugin\Purge\TagsHeader\TagsHeaderInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
class AcquiaCloudSiteHeader extends TagsHeaderBase implements TagsHeaderInterface {
protected $identifier = '';
public final function __construct(array $configuration, $plugin_id, $plugin_definition, PlatformInfoInterface $acquia_purge_platforminfo) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->identifier = $acquia_purge_platforminfo
->getSiteIdentifier();
}
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('acquia_purge.platforminfo'));
}
public function getValue(array $tags) {
return $this->identifier;
}
}