ThrobberPluginBase.php in Ajax loader 8
File
src/ThrobberPluginBase.php
View source
<?php
namespace Drupal\ajax_loader;
use Drupal\Core\Plugin\PluginBase;
abstract class ThrobberPluginBase extends PluginBase implements ThrobberPluginInterface {
protected $path;
protected $markup;
protected $css_file;
protected $label;
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();
}
public function getMarkup() {
return $this->markup;
}
public function getCssFile() {
return $this->css_file;
}
public function getLabel() {
return $this->configuration['label'];
}
protected abstract function setMarkup();
protected abstract function setCssFile();
}