Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
16.67% |
1 / 6 |
CRAP | |
33.33% |
3 / 9 |
ConfigurableActionBase | |
0.00% |
0 / 1 |
|
16.67% |
1 / 6 |
16.67 | |
33.33% |
3 / 9 |
__construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
defaultConfiguration | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
getConfiguration | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
setConfiguration | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
validateConfigurationForm | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
calculateDependencies | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
<?php | |
/** | |
* @file | |
* Contains \Drupal\Core\Action\ConfigurableActionBase. | |
*/ | |
namespace Drupal\Core\Action; | |
use Drupal\Component\Plugin\ConfigurablePluginInterface; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\Core\Plugin\PluginFormInterface; | |
/** | |
* Provides a base implementation for a configurable Action plugin. | |
*/ | |
abstract class ConfigurableActionBase extends ActionBase implements ConfigurablePluginInterface, PluginFormInterface { | |
/** | |
* {@inheritdoc} | |
*/ | |
public function __construct(array $configuration, $plugin_id, $plugin_definition) { | |
parent::__construct($configuration, $plugin_id, $plugin_definition); | |
$this->configuration += $this->defaultConfiguration(); | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function defaultConfiguration() { | |
return array(); | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function getConfiguration() { | |
return $this->configuration; | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function setConfiguration(array $configuration) { | |
$this->configuration = $configuration; | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function calculateDependencies() { | |
return array(); | |
} | |
} |