You are here

interface GroupingInterface in Mass Contact 8

Defineds a grouping method interface.

Hierarchy

Expanded class hierarchy of GroupingInterface

All classes that implement GroupingInterface

1 string reference to 'GroupingInterface'
mass_contact.services.yml in ./mass_contact.services.yml
mass_contact.services.yml

File

src/Plugin/MassContact/GroupingMethod/GroupingInterface.php, line 13

Namespace

Drupal\mass_contact\Plugin\MassContact\GroupingMethod
View source
interface GroupingInterface extends PluginInspectionInterface, DerivativeInspectionInterface, ConfigurablePluginInterface {

  /**
   * Retrieve the list of users by category.
   *
   * @param array $categories
   *   An array of category IDs for which to retrieve users. For instance,
   *   in the role grouping this would be an array of role IDs.
   *
   * @return int[]
   *   An array of recipient user IDs.
   */
  public function getRecipients(array $categories);

  /**
   * Display list of categories.
   *
   * @param array $categories
   *   An array of category IDs.
   *
   * @return string
   *   Display included categories as a string.
   */
  public function displayCategories(array $categories);

  /**
   * Builds the form for selecting categories for a mass contact.
   *
   * @param array $form
   *   The form definition array.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state object.
   */
  public function adminForm(array &$form, FormStateInterface $form_state);

  /**
   * Retrieves a list of category IDs.
   *
   * @return array
   *   An array of category IDs (role IDs, term IDs, etc).
   */
  public function getCategories();

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurablePluginInterface::defaultConfiguration public function Gets default configuration for this plugin. 1
ConfigurablePluginInterface::getConfiguration public function Gets this plugin's configuration. 1
ConfigurablePluginInterface::setConfiguration public function Sets the configuration for this plugin instance. 1
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
DerivativeInspectionInterface::getBaseId public function Gets the base_plugin_id of the plugin instance. 1
DerivativeInspectionInterface::getDerivativeId public function Gets the derivative_id of the plugin instance. 1
GroupingInterface::adminForm public function Builds the form for selecting categories for a mass contact. 1
GroupingInterface::displayCategories public function Display list of categories. 1
GroupingInterface::getCategories public function Retrieves a list of category IDs. 1
GroupingInterface::getRecipients public function Retrieve the list of users by category. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2