diff -u b/src/Plugin/monitoring/SensorPlugin/PaymentTurnoverSensorPlugin.php b/src/Plugin/monitoring/SensorPlugin/PaymentTurnoverSensorPlugin.php --- b/src/Plugin/monitoring/SensorPlugin/PaymentTurnoverSensorPlugin.php +++ b/src/Plugin/monitoring/SensorPlugin/PaymentTurnoverSensorPlugin.php @@ -28,6 +28,16 @@ /** * {@inheritdoc} */ + protected $configurableEntityType = FALSE; + + /** + * {@inheritdoc} + */ + protected $configurableTimestampField = FALSE; + + /** + * {@inheritdoc} + */ public function runSensor(SensorResultInterface $sensor_result) { // @todo This will not perform for large number of payments. // @todo Use a condition for the currency when available again. @@ -52,2 +62,14 @@ + /** + * {@inheritdoc} + */ + public function getDefaultConfiguration() { + $default_config = array( + 'settings' => array( + 'entity_type' => 'payment', + ), + ); + return $default_config; + } + } only in patch2: unchanged: --- a/src/Plugin/monitoring/SensorPlugin/ContentEntityAggregatorSensorPlugin.php +++ b/src/Plugin/monitoring/SensorPlugin/ContentEntityAggregatorSensorPlugin.php @@ -62,6 +62,13 @@ class ContentEntityAggregatorSensorPlugin extends DatabaseAggregatorSensorPlugin protected $entityQueryFactory; /** + * Allows plugins to control if the entity type can be configured. + * + * @var bool + */ + protected $configurableEntityType = TRUE; + + /** * Builds the entity aggregate query. * * @return \Drupal\Core\Entity\Query\QueryAggregateInterface @@ -322,6 +329,7 @@ class ContentEntityAggregatorSensorPlugin extends DatabaseAggregatorSensorPlugin 'wrapper' => 'selected-output', 'method' => 'replace', ), + '#access' => $this->configurableEntityType, ); if (!isset($settings['entity_type'])) { $form['entity_type']['#required'] = TRUE;