whitelabel-8.x-2.x-dev/src/WhiteLabelProviderInterface.php

src/WhiteLabelProviderInterface.php
<?php

namespace Drupal\whitelabel;

use Drupal\whitelabel\Entity\WhiteLabelInterface;

/**
 * Provides an active white label object.
 *
 * If there is no current white label session active, NULL is returned.
 */
interface WhiteLabelProviderInterface {

  /**
   * Returns a white label matching a given token.
   *
   * @param string $token
   *   The token to fetch the white label for.
   *
   * @return \Drupal\whitelabel\Entity\WhiteLabelInterface|null
   *   The loaded white label entity or NULL if it could not be presented.
   */
  public function getWhiteLabelByToken($token);

  /**
   * Returns the white label associated with this session.
   *
   * @return \Drupal\whitelabel\Entity\WhiteLabelInterface|null
   *   The loaded white label entity or NULL if it could not be presented.
   */
  public function getWhiteLabel();

  /**
   * Sets a new white label entity for this session.
   *
   * @param \Drupal\whitelabel\Entity\WhiteLabelInterface $white_label
   *   The white label object to set.
   */
  public function setWhiteLabel(WhiteLabelInterface $white_label);

  /**
   * Resets a white label entity from the session.
   */
  public function resetWhiteLabel();

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc