class FixedRatesOperationsProvider in Currency 8.3
Provides operations for the fixed rates exchange rate provider.
Hierarchy
- class \Drupal\currency\Plugin\Currency\ExchangeRateProvider\FixedRatesOperationsProvider implements ContainerInjectionInterface, PluginOperationsProviderInterface uses StringTranslationTrait
Expanded class hierarchy of FixedRatesOperationsProvider
1 file declares its use of FixedRatesOperationsProvider
- FixedRatesOperationsProviderTest.php in tests/
src/ Unit/ Plugin/ Currency/ ExchangeRateProvider/ FixedRatesOperationsProviderTest.php
File
- src/
Plugin/ Currency/ ExchangeRateProvider/ FixedRatesOperationsProvider.php, line 16
Namespace
Drupal\currency\Plugin\Currency\ExchangeRateProviderView source
class FixedRatesOperationsProvider implements PluginOperationsProviderInterface, ContainerInjectionInterface {
use StringTranslationTrait;
/**
* The redirect destination.
*
* @var \Drupal\Core\Routing\RedirectDestinationInterface
*/
protected $redirectDestination;
/**
* Constructs a new instance.
*
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* The string translator.
* @param \Drupal\Core\Routing\RedirectDestinationInterface $redirect_destination
* The redirect destination.
*/
public function __construct(TranslationInterface $string_translation, RedirectDestinationInterface $redirect_destination) {
$this->redirectDestination = $redirect_destination;
$this->stringTranslation = $string_translation;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static($container
->get('string_translation'), $container
->get('redirect.destination'));
}
/**
* {@inheritdoc}
*/
public function getOperations($plugin_id) {
$operations['configure'] = array(
'title' => $this
->t('Configure'),
'query' => $this->redirectDestination
->getAsArray(),
'url' => new Url('currency.exchange_rate_provider.fixed_rates.overview'),
);
return $operations;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FixedRatesOperationsProvider:: |
protected | property | The redirect destination. | |
FixedRatesOperationsProvider:: |
public static | function |
Instantiates a new instance of this class. Overrides ContainerInjectionInterface:: |
|
FixedRatesOperationsProvider:: |
public | function |
Gets plugin operations. Overrides PluginOperationsProviderInterface:: |
|
FixedRatesOperationsProvider:: |
public | function | Constructs a new instance. | |
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. |