You are here

interface LoginRedirectPerRoleInterface in Login And Logout Redirect Per Role 8

Interface defining Login And Logout Redirect Per Role helper service.

Hierarchy

Expanded class hierarchy of LoginRedirectPerRoleInterface

All classes that implement LoginRedirectPerRoleInterface

1 file declares its use of LoginRedirectPerRoleInterface
RedirectURLSettingsForm.php in src/Form/RedirectURLSettingsForm.php

File

src/LoginRedirectPerRoleInterface.php, line 10

Namespace

Drupal\login_redirect_per_role
View source
interface LoginRedirectPerRoleInterface {

  /**
   * Config key for Login configuration.
   */
  const CONFIG_KEY_LOGIN = 'login';

  /**
   * Config key for Logout configuration.
   */
  const CONFIG_KEY_LOGOUT = 'logout';

  /**
   * Checks is login redirect action applicable on current page.
   *
   * @return bool
   *   Result of check.
   */
  public function isApplicableOnCurrentPage();

  /**
   * Return URL to redirect on user login.
   *
   * @return \Drupal\Core\Url|null
   *   URL to redirect to on success or NULL otherwise.
   */
  public function getLoginRedirectUrl();

  /**
   * Set Login destination parameter to do redirect.
   *
   * @param \Drupal\Core\Session\AccountInterface|null $account
   *   User account to set destination for.
   */
  public function setLoginDestination(AccountInterface $account = NULL);

  /**
   * Return URL to redirect on user logout.
   *
   * @return \Drupal\Core\Url|null
   *   URL to redirect to on success or NULL otherwise.
   */
  public function getLogoutRedirectUrl();

  /**
   * Set Logout destination parameter to do redirect.
   *
   * @param \Drupal\Core\Session\AccountInterface|null $account
   *   User account to set destination for.
   */
  public function setLogoutDestination(AccountInterface $account = NULL);

  /**
   * Return logout configuration.
   *
   * @return array
   *   Logout configuration on success or an empty array otherwise.
   */
  public function getLogoutConfig();

  /**
   * Return login configuration.
   *
   * @return array
   *   Login configuration on success or an empty array otherwise.
   */
  public function getLoginConfig();

}

Members

Namesort descending Modifiers Type Description Overrides
LoginRedirectPerRoleInterface::CONFIG_KEY_LOGIN constant Config key for Login configuration.
LoginRedirectPerRoleInterface::CONFIG_KEY_LOGOUT constant Config key for Logout configuration.
LoginRedirectPerRoleInterface::getLoginConfig public function Return login configuration. 1
LoginRedirectPerRoleInterface::getLoginRedirectUrl public function Return URL to redirect on user login. 1
LoginRedirectPerRoleInterface::getLogoutConfig public function Return logout configuration. 1
LoginRedirectPerRoleInterface::getLogoutRedirectUrl public function Return URL to redirect on user logout. 1
LoginRedirectPerRoleInterface::isApplicableOnCurrentPage public function Checks is login redirect action applicable on current page. 1
LoginRedirectPerRoleInterface::setLoginDestination public function Set Login destination parameter to do redirect. 1
LoginRedirectPerRoleInterface::setLogoutDestination public function Set Logout destination parameter to do redirect. 1