interface MessagePurgeInterface in Message 8
Interface for MessagePurge plugins.
Hierarchy
- interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Core\Plugin\PluginFormInterface
- interface \Drupal\message\MessagePurgeInterface
Expanded class hierarchy of MessagePurgeInterface
All classes that implement MessagePurgeInterface
2 files declare their use of MessagePurgeInterface
- DaysTest.php in tests/
src/ Unit/ Plugin/ MessagePurge/ DaysTest.php - message.module in ./
message.module - API functions to manipulate messages.
File
- src/
MessagePurgeInterface.php, line 11
Namespace
Drupal\messageView source
interface MessagePurgeInterface extends ConfigurableInterface, PluginFormInterface {
/**
* The maximum number of messages that a queue worker should delete at once.
*/
const MESSAGE_DELETE_SIZE = 100;
/**
* Fetch the messages that need to be purged for a given template.
*
* @param \Drupal\message\MessageTemplateInterface $template
* The message template to fetch messages for.
*
* @return array
* An array of \Drupal\message\MessageInterface entity IDs.
*/
public function fetch(MessageTemplateInterface $template);
/**
* Process the purgeable messages.
*
* Normally this is a bulk delete operation.
*
* @param array $ids
* The message IDs to be processed.
*
* @return bool
* The result of the process.
*/
public function process(array $ids);
/**
* Returns the purge method label.
*
* @return string
* The purge method label.
*/
public function label();
/**
* Returns the purge method description.
*
* @return string
* The purge plugin description.
*/
public function description();
/**
* Returns the weight of the purge plugin.
*
* @return int
* The integer weight of the purge plugin.
*/
public function getWeight();
/**
* Sets the weight for this purge plugin.
*
* @param int $weight
* The weight for this purge plugin.
*
* @return $this
*/
public function setWeight($weight);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
MessagePurgeInterface:: |
public | function | Returns the purge method description. | 1 |
MessagePurgeInterface:: |
public | function | Fetch the messages that need to be purged for a given template. | 2 |
MessagePurgeInterface:: |
public | function | Returns the weight of the purge plugin. | 1 |
MessagePurgeInterface:: |
public | function | Returns the purge method label. | 1 |
MessagePurgeInterface:: |
constant | The maximum number of messages that a queue worker should delete at once. | ||
MessagePurgeInterface:: |
public | function | Process the purgeable messages. | 1 |
MessagePurgeInterface:: |
public | function | Sets the weight for this purge plugin. | 1 |
PluginFormInterface:: |
public | function | Form constructor. | 36 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |