interface UpdateRunnerInterface in Scheduled Updates 8
Interface for Update Runner Plugins.
Update Runners control on updates are run and how they are connected to entities.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Core\Plugin\ContainerFactoryPluginInterface; interface \Drupal\Core\Plugin\PluginFormInterface
- interface \Drupal\scheduled_updates\Plugin\UpdateRunnerInterface
Expanded class hierarchy of UpdateRunnerInterface
All classes that implement UpdateRunnerInterface
6 files declare their use of UpdateRunnerInterface
- AddFieldScheduledUpdateTypeTest.php in tests/
src/ FunctionalJavascript/ AddFieldScheduledUpdateTypeTest.php - Contains \Drupal\Tests\scheduled_updates\AddFieldScheduledUpdateTypeTest.
- EmbeddedScheduledUpdateTypeTest.php in tests/
src/ FunctionalJavascript/ EmbeddedScheduledUpdateTypeTest.php - Contains \Drupal\Tests\scheduled_updates\EmbeddedScheduledUpdateTypeTest.
- IndependentUpdateRunner.php in src/
Plugin/ UpdateRunner/ IndependentUpdateRunner.php - Contains \Drupal\scheduled_updates\Plugin\UpdateRunner\IndependentUpdateRunner.
- ScheduledUpdatesTestBase.php in tests/
src/ FunctionalJavascript/ ScheduledUpdatesTestBase.php - Contains \Drupal\Tests\scheduled_updates\ScheduledUpdatesTestBase.
- ScheduledUpdateTypeBaseForm.php in src/
Form/ ScheduledUpdateTypeBaseForm.php - Contains \Drupal\scheduled_updates\Form\ScheduledUpdateTypeBaseForm.
File
- src/
Plugin/ UpdateRunnerInterface.php, line 18 - Contains Drupal\scheduled_updates\Plugin\UpdateRunnerInterface.
Namespace
Drupal\scheduled_updates\PluginView source
interface UpdateRunnerInterface extends PluginInspectionInterface, ContainerFactoryPluginInterface, PluginFormInterface {
// Constants for Invalid Updates
const INVALID_DELETE = 'DELETE';
const INVALID_REQUEUE = 'REQUEUE';
const INVALID_ARCHIVE = 'ARCHIVE';
// Constants for behavior after updates are run.
const AFTER_DELETE = 'DELETE';
const AFTER_ARCHIVE = 'ARCHIVE';
// Constants for revisions.
const REVISIONS_BUNDLE_DEFAULT = 'BUNDLE_DEFAULT';
const REVISIONS_YES = 'YES';
const REVISIONS_NO = 'NO';
// Constants for update user
const USER_UPDATE_RUNNER = 'USER_UPDATE_RUNNER';
const USER_OWNER = 'USER_OWNER';
const USER_REVISION_OWNER = 'USER_REVISION_OWNER';
const USER_UPDATE_OWNER = 'USER_UPDATE_OWNER';
/**
* Add all updates to queue.
*/
public function addUpdatesToQueue();
/**
* Get the Queue for this Update Runner.
*
* @return \Drupal\Core\Queue\QueueInterface
* The queue object.
*/
public function getQueue();
/**
* Run all updates that are in the queue.
*
* @param $time_end
* The time in seconds when no more updates should be run.
*
* @return
*/
public function runUpdatesInQueue($time_end);
/**
* Get how this runner should handle invalid entity updates.
*
* @return string
*/
public function getInvalidUpdateBehavior();
/**
* Get all field ids that are attached to the entity type to be updated and
* target this update type.
*
* @return array
*/
public function getReferencingFieldIds();
/**
* Return the entity id of the entity type being updated.
*
* @return string
*/
public function updateEntityType();
/**
* Get target entity ids for an entity reference field on a entity.
*
* @todo Is there a way to do this with core Field API?
*
* @todo move this to a Utils trait or class.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* @param $field_name
*
* @param bool $sort
*
* @return array Entity Ids for field values.
* Entity Ids for field values.
*/
public function getEntityReferenceTargetIds(ContentEntityInterface $entity, $field_name, $sort = FALSE);
/**
* Get the description of the Runner Plugin.
*
* Usually this will return description from the plugin itself but some runners
* may need a dynamic description or a long description.
*
* @return string
*/
public function getDescription();
/**
* Set wether or not the updates are run by cron.
*
* @param bool $run_by_cron
* Wether or not the updates are runs by cron.
*/
public function setRunByCron($run_by_cron);
/**
* Get whether or not the updates are run by cron.
*
* @return boolean
* Whether or not the updates are run by cron.
*/
public function isRunByCron();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ContainerFactoryPluginInterface:: |
public static | function | Creates an instance of the plugin. | 112 |
PluginFormInterface:: |
public | function | Form constructor. | 36 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
UpdateRunnerInterface:: |
public | function | Add all updates to queue. | 1 |
UpdateRunnerInterface:: |
constant | |||
UpdateRunnerInterface:: |
constant | |||
UpdateRunnerInterface:: |
public | function | Get the description of the Runner Plugin. | 1 |
UpdateRunnerInterface:: |
public | function | Get target entity ids for an entity reference field on a entity. | 1 |
UpdateRunnerInterface:: |
public | function | Get how this runner should handle invalid entity updates. | 1 |
UpdateRunnerInterface:: |
public | function | Get the Queue for this Update Runner. | 1 |
UpdateRunnerInterface:: |
public | function | Get all field ids that are attached to the entity type to be updated and target this update type. | 1 |
UpdateRunnerInterface:: |
constant | |||
UpdateRunnerInterface:: |
constant | |||
UpdateRunnerInterface:: |
constant | |||
UpdateRunnerInterface:: |
public | function | Get whether or not the updates are run by cron. | 1 |
UpdateRunnerInterface:: |
constant | |||
UpdateRunnerInterface:: |
constant | |||
UpdateRunnerInterface:: |
constant | |||
UpdateRunnerInterface:: |
public | function | Run all updates that are in the queue. | 1 |
UpdateRunnerInterface:: |
public | function | Set wether or not the updates are run by cron. | 1 |
UpdateRunnerInterface:: |
public | function | Return the entity id of the entity type being updated. | 1 |
UpdateRunnerInterface:: |
constant | |||
UpdateRunnerInterface:: |
constant | |||
UpdateRunnerInterface:: |
constant | |||
UpdateRunnerInterface:: |
constant |