class Users in Views (for Drupal 7) 8.3
Tests creating user views with the wizard.
Plugin annotation
@Plugin(
id = "users",
module = "user",
base_table = "users",
title = @Translation("Users")
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\wizard\WizardPluginBase implements WizardInterface
- class \Views\user\Plugin\views\wizard\Users
- class \Drupal\views\Plugin\views\wizard\WizardPluginBase implements WizardInterface
- class \Drupal\views\Plugin\views\PluginBase
Expanded class hierarchy of Users
File
- lib/
Views/ user/ Plugin/ views/ wizard/ Users.php, line 28 - Definition of Views\user\Plugin\views\wizard\Users.
Namespace
Views\user\Plugin\views\wizardView source
class Users extends WizardPluginBase {
/**
* Set the created column.
*/
protected $createdColumn = 'created';
/**
* Set default values for the path field options.
*/
protected $pathField = array(
'id' => 'uid',
'table' => 'users',
'field' => 'uid',
'exclude' => TRUE,
'link_to_user' => FALSE,
'alter' => array(
'alter_text' => TRUE,
'text' => 'user/[uid]',
),
);
/**
* Set default values for the filters.
*/
protected $filters = array(
'status' => array(
'value' => TRUE,
'table' => 'users',
'field' => 'status',
),
);
/**
* Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::default_display_options().
*/
protected function default_display_options() {
$display_options = parent::default_display_options();
// Add permission-based access control.
$display_options['access']['type'] = 'perm';
$display_options['access']['perm'] = 'access user profiles';
// Remove the default fields, since we are customizing them here.
unset($display_options['fields']);
/* Field: User: Name */
$display_options['fields']['name']['id'] = 'name';
$display_options['fields']['name']['table'] = 'users';
$display_options['fields']['name']['field'] = 'name';
$display_options['fields']['name']['label'] = '';
$display_options['fields']['name']['alter']['alter_text'] = 0;
$display_options['fields']['name']['alter']['make_link'] = 0;
$display_options['fields']['name']['alter']['absolute'] = 0;
$display_options['fields']['name']['alter']['trim'] = 0;
$display_options['fields']['name']['alter']['word_boundary'] = 0;
$display_options['fields']['name']['alter']['ellipsis'] = 0;
$display_options['fields']['name']['alter']['strip_tags'] = 0;
$display_options['fields']['name']['alter']['html'] = 0;
$display_options['fields']['name']['hide_empty'] = 0;
$display_options['fields']['name']['empty_zero'] = 0;
$display_options['fields']['name']['link_to_user'] = 1;
$display_options['fields']['name']['overwrite_anonymous'] = 0;
return $display_options;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
public | property | Plugins's definition | |
PluginBase:: |
public | property | The display object this plugin is for. | |
PluginBase:: |
public | property | Options for this plugin will be held here. | |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
protected | property | Denotes whether the plugin has an additional options form. | 8 |
PluginBase:: |
public | property | The top object of a view. | 1 |
PluginBase:: |
public | function | Provide a list of additional theme functions for the theme information page | |
PluginBase:: |
public | function | Provide a form to edit options for this plugin. | 14 |
PluginBase:: |
protected | function | Information about options for all kinds of purposes will be held here. @code 'option_name' => array( | 13 |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function | Clears a plugin. | 2 |
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
PluginBase:: |
public | function | Return the human readable name of the display. | |
PluginBase:: |
public | function | Add anything to the query that we might need to. | 13 |
PluginBase:: |
protected | function | ||
PluginBase:: |
public | function | Handle any special handling on the validate form. | 10 |
PluginBase:: |
public | function | Returns the summary of the settings in the display. | 6 |
PluginBase:: |
public | function | Provide a full list of possible theme templates used by this style. | 1 |
PluginBase:: |
public | function | Unpack options over our existing defaults, drilling down into arrays so that defaults don't get totally blown away. | |
PluginBase:: |
public | function | Returns the usesOptions property. | 8 |
PluginBase:: |
public | function | Validate that the plugin is correct and can be saved. | 4 |
PluginBase:: |
public | function | Validate the options form. | 11 |
Users:: |
protected | property |
Set the created column. Overrides WizardPluginBase:: |
|
Users:: |
protected | property |
Set default values for the filters. Overrides WizardPluginBase:: |
|
Users:: |
protected | property |
Set default values for the path field options. Overrides WizardPluginBase:: |
|
Users:: |
protected | function |
Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::default_display_options(). Overrides WizardPluginBase:: |
|
WizardPluginBase:: |
protected | property | The available store criteria. | |
WizardPluginBase:: |
protected | property | The base table connected with the wizard. | |
WizardPluginBase:: |
protected | property | Contains the information from entity_get_info of the $entity_type. | |
WizardPluginBase:: |
protected | property | The entity type connected with the wizard. | |
WizardPluginBase:: |
protected | property | Default values for filters. | |
WizardPluginBase:: |
protected | property | Additional fields required to generate the pathField. | 1 |
WizardPluginBase:: |
protected | property | Views items configuration arrays for sorts added by the wizard. | |
WizardPluginBase:: |
protected | property | An array of validated view objects, keyed by a hash. | |
WizardPluginBase:: |
protected | function | Adds the array of display options to the view, with appropriate overrides. | |
WizardPluginBase:: |
protected | function | Alters the full array of display options before they are added to the view. | |
WizardPluginBase:: |
protected | function | Retrieves the block display options. | 2 |
WizardPluginBase:: |
protected | function | Builds an array of display options for the view. | |
WizardPluginBase:: |
protected | function | Builds the form structure for selecting the view's filters. | 1 |
WizardPluginBase:: |
function |
Implements Drupal\views\Plugin\views\wizard\WizardInterface::build_form(). Overrides WizardInterface:: |
||
WizardPluginBase:: |
protected | function | Adds the style options to the wizard form. | 2 |
WizardPluginBase:: |
protected | function | Builds the form structure for selecting the view's sort order. | |
WizardPluginBase:: |
function |
Implements Drupal\views\Plugin\views\wizard\WizardInterface::create_view(). Overrides WizardInterface:: |
||
WizardPluginBase:: |
protected | function | Retrieves all filter information used by the default display. | |
WizardPluginBase:: |
protected | function | Retrieves filter information based on user input for the default display. | 1 |
WizardPluginBase:: |
protected | function | Retrieves all sort information used by the default display. | |
WizardPluginBase:: |
protected | function | Retrieves sort information based on user input for the default display. | |
WizardPluginBase:: |
public | function | Gets the availableSorts property. | 1 |
WizardPluginBase:: |
public | function | Gets the createdColumn property. | |
WizardPluginBase:: |
public | function | Gets the filters property. | |
WizardPluginBase:: |
public | function | Gets the pathField property. | |
WizardPluginBase:: |
public | function | Gets the pathFieldsSupplemental property. | |
WizardPluginBase:: |
public | function | Gets the sorts property. | |
WizardPluginBase:: |
protected | function | Instantiates a view object from form values. | |
WizardPluginBase:: |
protected | function | Retrieves the page display options. | 2 |
WizardPluginBase:: |
protected | function | Retrieves the feed display options. | |
WizardPluginBase:: |
protected | function | Retrieves a validated view for a form submission. | |
WizardPluginBase:: |
protected | function | Retrieves row style plugin names. | 3 |
WizardPluginBase:: |
protected | function | Sets options for a display and makes them the default options if possible. | |
WizardPluginBase:: |
protected | function | Sets options for a display, inheriting from the defaults when possible. | |
WizardPluginBase:: |
protected | function | Stores a validated view from a form submission. | |
WizardPluginBase:: |
public | function |
Implements Drupal\views\Plugin\views\wizard\WizardInterface::validate(). Overrides WizardInterface:: |
|
WizardPluginBase:: |
public | function |
Constructs a WizardPluginBase object. Overrides PluginBase:: |