class Username in Author Pane 8.3
Provides the Username plugin.
Plugin annotation
@AuthorPaneDatum(
id = "username",
label = @Translation("Username"),
description = @Translation("Author's user name"),
name = "username",
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\author_pane\Plugin\AuthorPane\AuthorDatumBase
- class \Drupal\author_pane\Plugin\AuthorPane\Username
- class \Drupal\author_pane\Plugin\AuthorPane\AuthorDatumBase
Expanded class hierarchy of Username
File
- src/
Plugin/ AuthorPane/ Username.php, line 21 - Contains \Drupal\author_pane\Plugin\Username.
Namespace
Drupal\author_pane\Plugin\AuthorPaneView source
class Username extends AuthorDatumBase {
public function output() {
// @TODO: Change this to the real output.
return "Author's name is: " . $this->author
->getUsername();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AuthorDatumBase:: |
protected | property | ||
AuthorDatumBase:: |
protected | property | A longer explanation of what the plugin is for. | |
AuthorDatumBase:: |
protected | property | Machine name of the plugin. | |
AuthorDatumBase:: |
protected | property | Title of the plugin. | |
AuthorDatumBase:: |
protected | property | The value associated with the plugin in this instance. | |
AuthorDatumBase:: |
public | function | Returns the description of the datum. | |
AuthorDatumBase:: |
public | function | Returns the id of the datum. | |
AuthorDatumBase:: |
public | function | Returns the label of the datum. | |
AuthorDatumBase:: |
public | function | Sets the author of the datum. | |
AuthorDatumBase:: |
public | function | Sets the value of the datum. | |
AuthorDatumBase:: |
protected | function | Returns the value of the datum. | |
AuthorDatumBase:: |
public | function |
Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
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. | |
Username:: |
public | function |
Returns the HTML string that contains the output of the datum. Overrides AuthorDatumBase:: |