abstract class ThrobberPluginBase in Ajax loader 8
Class ThrobberBase.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\ajax_loader\ThrobberPluginBase implements ThrobberPluginInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of ThrobberPluginBase
11 files declare their use of ThrobberPluginBase
- ThrobberChasingDots.php in src/
Plugin/ ajax_loader/ ThrobberChasingDots.php - ThrobberCircle.php in src/
Plugin/ ajax_loader/ ThrobberCircle.php - ThrobberCubeGrid.php in src/
Plugin/ ajax_loader/ ThrobberCubeGrid.php - ThrobberDoubleBounce.php in src/
Plugin/ ajax_loader/ ThrobberDoubleBounce.php - ThrobberFadingCircle.php in src/
Plugin/ ajax_loader/ ThrobberFadingCircle.php
File
- src/
ThrobberPluginBase.php, line 10
Namespace
Drupal\ajax_loaderView source
abstract class ThrobberPluginBase extends PluginBase implements ThrobberPluginInterface {
protected $path;
protected $markup;
/** @codingStandardsIgnoreLine. */
protected $css_file;
protected $label;
/**
* ThrobberPluginBase constructor.
*
* @param array $configuration
* Array with configuration.
* @param string $plugin_id
* String with plugin id.
* @param mixed $plugin_definition
* Plugin definition value.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->path = '/' . drupal_get_path('module', 'ajax_loader');
$this->markup = $this
->setMarkup();
$this->css_file = $this
->setCssFile();
}
/**
* Function to get markup.
*
* @return mixed
* Return markup.
*/
public function getMarkup() {
return $this->markup;
}
/**
* Function to get css file.
*
* @return mixed
* Return the css file.
*/
public function getCssFile() {
return $this->css_file;
}
/**
* Function to get label.
*
* @return mixed
* Return the label.
*/
public function getLabel() {
return $this->configuration['label'];
}
/**
* Sets markup for throbber.
*/
protected abstract function setMarkup();
/**
* Sets css file for throbber.
*/
protected abstract function setCssFile();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
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. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
ThrobberPluginBase:: |
protected | property | @codingStandardsIgnoreLine. | |
ThrobberPluginBase:: |
protected | property | ||
ThrobberPluginBase:: |
protected | property | ||
ThrobberPluginBase:: |
protected | property | ||
ThrobberPluginBase:: |
public | function |
Function to get css file. Overrides ThrobberPluginInterface:: |
|
ThrobberPluginBase:: |
public | function |
Function to get label. Overrides ThrobberPluginInterface:: |
|
ThrobberPluginBase:: |
public | function |
Function to get markup. Overrides ThrobberPluginInterface:: |
|
ThrobberPluginBase:: |
abstract protected | function | Sets css file for throbber. | 11 |
ThrobberPluginBase:: |
abstract protected | function | Sets markup for throbber. | 11 |
ThrobberPluginBase:: |
public | function |
ThrobberPluginBase constructor. Overrides PluginBase:: |