reviewer-1.2.x-dev/src/Reviewer/Review/ReviewRunnerInterface.php
src/Reviewer/Review/ReviewRunnerInterface.php
<?php
namespace Drupal\reviewer\Reviewer\Review;
use Drupal\reviewer\Reviewer\Action;
/**
* Defines a class which runs reviews.
*/
interface ReviewRunnerInterface {
/**
* Run reviews from review plugin IDs.
*
* @param string[] $review_ids
* Review plugin IDs to run. Omit for all reviews.
* @param string[] $bundles
* The bundles of the entity type to review. Omit to test all bundles of the
* entity type, or if the entity type does not support bundles.
*
* @return array<string, \Drupal\reviewer\Reviewer\Review\ReviewInterface>
* Results keyed by result ID.
*
* @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
* @throws \Drupal\reviewer\Exception\NoChecklistsException
* Thrown when no checklists are defined in the review.
*/
public function runIds(
Action $action,
array $review_ids = [],
array $bundles = [],
): array;
/**
* Run reviews from review plugins.
*
* @param \Drupal\reviewer\Plugin\reviewer\Review\ReviewPluginInterface[] $review_plugins
* Review plugins to run. Omit for all reviews.
* @param string[] $bundles
* The bundles of the entity type to review. Omit to test all bundles of the
* entity type, or if the entity type does not support bundles.
*
* @return array<string, \Drupal\reviewer\Reviewer\Review\ReviewInterface>
* Results keyed by result ID.
*
* @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
* @throws \Drupal\reviewer\Exception\NoChecklistsException
* Thrown when no checklists are defined in the review.
*/
public function runPlugins(
Action $action,
array $review_plugins = [],
array $bundles = [],
): array;
}
