GroupingBase.php in Mass Contact 8
File
src/Plugin/MassContact/GroupingMethod/GroupingBase.php
View source
<?php
namespace Drupal\mass_contact\Plugin\MassContact\GroupingMethod;
use Drupal\Component\Plugin\PluginBase;
use Drupal\Core\StringTranslation\StringTranslationTrait;
abstract class GroupingBase extends PluginBase implements GroupingInterface {
use StringTranslationTrait;
public function getConfiguration() {
return $this->configuration;
}
public function setConfiguration(array $configuration) {
$this->configuration = NestedArray::mergeDeep($this
->defaultConfiguration(), $configuration);
}
public function defaultConfiguration() {
return [
'categories' => [],
'conjunction' => 'OR',
];
}
public function getCategories() {
return $this->configuration['categories'];
}
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
}
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
}
}