You are here

User.php in Rabbit Hole 8

Same filename and directory in other branches
  1. 2.x modules/rh_user/src/Plugin/RabbitHoleEntityPlugin/User.php

File

modules/rh_user/src/Plugin/RabbitHoleEntityPlugin/User.php
View source
<?php

namespace Drupal\rh_user\Plugin\RabbitHoleEntityPlugin;

use Drupal\Core\Form\FormStateInterface;
use Drupal\rabbit_hole\Plugin\RabbitHoleEntityPluginBase;

/**
 * Implements rabbit hole behavior for users.
 *
 * @RabbitHoleEntityPlugin(
 *  id = "rh_user",
 *  label = @Translation("User"),
 *  entityType = "user"
 * )
 */
class User extends RabbitHoleEntityPluginBase {

  /**
   * {@inheritdoc}
   */
  public function getGlobalConfigFormId() {
    return "user_admin_settings";
  }

  /**
   * {@inheritdoc}
   */
  public function getGlobalFormSubmitHandlerAttachLocations(array $form, FormStateInterface $form_state) {
    return [
      '#submit',
    ];
  }

}

Classes

Namesort descending Description
User Implements rabbit hole behavior for users.