예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function checkIntegrity(ExecutionMetadataStateInterface $metadata_state)
 {
     $violation_list = new IntegrityViolationList();
     if (empty($this->configuration['action_id'])) {
         $violation_list->addViolationWithMessage($this->t('Action plugin ID is missing'));
         return $violation_list;
     }
     if (!$this->actionManager->hasDefinition($this->configuration['action_id'])) {
         $violation_list->addViolationWithMessage($this->t('Action plugin %plugin_id does not exist', ['%plugin_id' => $this->configuration['action_id']]));
         return $violation_list;
     }
     $action = $this->actionManager->createInstance($this->configuration['action_id']);
     return $this->doCheckIntegrity($action, $metadata_state);
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function checkIntegrity(ExecutionMetadataStateInterface $metadata_state, $apply_assertions = TRUE)
 {
     $violation_list = new IntegrityViolationList();
     if (empty($this->configuration['action_id'])) {
         $violation_list->addViolationWithMessage($this->t('Action plugin ID is missing'), $this->getUuid());
         return $violation_list;
     }
     if (!$this->actionManager->hasDefinition($this->configuration['action_id'])) {
         $violation_list->addViolationWithMessage($this->t('Action plugin %plugin_id does not exist', ['%plugin_id' => $this->configuration['action_id']]), $this->getUuid());
         return $violation_list;
     }
     $action = $this->actionManager->createInstance($this->configuration['action_id']);
     // Prepare and refine the context before checking integrity, such that any
     // context definition changes are respected while checking.
     $this->prepareContextWithMetadata($action, $metadata_state);
     $result = $this->checkContextConfigIntegrity($action, $metadata_state);
     $this->prepareExecutionMetadataState($metadata_state, NULL, $apply_assertions);
     return $result;
 }