You are here

interface ContainerManagerInterface in GoogleTagManager 8

Provides an interface for a Google tag container manager.

Hierarchy

Expanded class hierarchy of ContainerManagerInterface

All classes that implement ContainerManagerInterface

File

src/Entity/ContainerManagerInterface.php, line 16

Namespace

Drupal\google_tag\Entity
View source
interface ContainerManagerInterface {

  /**
   * Constructs a ContainerManager.
   *
   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
   *   The entity type manager.
   * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
   *   The config factory.
   * @param \Drupal\Core\File\FileSystemInterface $file_system
   *   The file system.
   * @param \Drupal\Core\Cache\CacheBackendInterface $cache
   *   The cache backend.
   * @param \Drupal\Core\Messenger\MessengerInterface $messenger
   *   The messenger.
   * @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory
   *   The logger factory.
   */
  public function __construct(EntityTypeManagerInterface $entity_type_manager, ConfigFactoryInterface $config_factory, FileSystemInterface $file_system, CacheBackendInterface $cache, MessengerInterface $messenger, LoggerChannelFactoryInterface $logger_factory);

  /**
   * Prepares directory for and saves snippet files for a container.
   *
   * @todo Which class-interface to use on @param?
   *
   * @param Drupal\Core\Config\Entity\ConfigEntityInterface $container
   *   The container configuration entity.
   *
   * @return bool
   *   Whether the files were saved.
   */
  public function createAssets(ConfigEntityInterface $container);

  /**
   * Saves JS snippet files based on current settings.
   *
   * @param Drupal\Core\Config\Entity\ConfigEntityInterface $container
   *   The container configuration entity.
   *
   * @return bool
   *   Whether the files were saved.
   */
  public function saveSnippets(ConfigEntityInterface $container);

  /**
   * Adds render array items of page attachments.
   *
   * @param array $attachments
   *   The attachments render array.
   */
  public function getScriptAttachments(array &$attachments);

  /**
   * Adds render array items of page top attachments.
   *
   * @param array $page
   *   The page render array.
   */
  public function getNoScriptAttachments(array &$page);

  /**
   * Prepares directory for and saves snippet files for all containers.
   *
   * @return bool
   *   Whether the files were saved.
   */
  public function createAllAssets();

  /**
   * Deletes snippet files for all containers.
   *
   * @return bool
   *   Whether the files were deleted.
   */
  public function deleteAllAssets();

  /**
   * Deletes snippet files for a container.
   *
   * @param Drupal\Core\Config\Entity\ConfigEntityInterface $container
   *   The container configuration entity.
   *
   * @return bool
   *   Whether the files were deleted.
   */
  public function deleteAssets(ConfigEntityInterface $container);

  /**
   * Finds snippet files for a container.
   *
   * @param Drupal\Core\Config\Entity\ConfigEntityInterface $container
   *   The container configuration entity.
   *
   * @return bool
   *   Whether the files were found.
   */
  public function findAssets(ConfigEntityInterface $container);

}

Members

Namesort descending Modifiers Type Description Overrides
ContainerManagerInterface::createAllAssets public function Prepares directory for and saves snippet files for all containers. 1
ContainerManagerInterface::createAssets public function Prepares directory for and saves snippet files for a container. 1
ContainerManagerInterface::deleteAllAssets public function Deletes snippet files for all containers. 1
ContainerManagerInterface::deleteAssets public function Deletes snippet files for a container. 1
ContainerManagerInterface::findAssets public function Finds snippet files for a container. 1
ContainerManagerInterface::getNoScriptAttachments public function Adds render array items of page top attachments. 1
ContainerManagerInterface::getScriptAttachments public function Adds render array items of page attachments. 1
ContainerManagerInterface::saveSnippets public function Saves JS snippet files based on current settings. 1
ContainerManagerInterface::__construct public function Constructs a ContainerManager. 1