diff --git a/tests/modules/entity_print_test/src/Plugin/EntityPrint/PdfEngine/NotAvailablePdfEngine.php b/tests/modules/entity_print_test/src/Plugin/EntityPrint/PdfEngine/NotAvailablePdfEngine.php deleted file mode 100644 index dd6aa65..0000000 --- a/tests/modules/entity_print_test/src/Plugin/EntityPrint/PdfEngine/NotAvailablePdfEngine.php +++ /dev/null @@ -1,36 +0,0 @@ -configuration['test_engine_suffix']; - echo $this->html; - flush(); - } - - /** - * {@inheritdoc} - */ - public function buildConfigurationForm(array $form, FormStateInterface $form_state) { - $form = parent::buildConfigurationForm($form, $form_state); - - $form['test_engine_setting'] = [ - '#title' => $this->t('Test setting'), - '#type' => 'textfield', - '#default_value' => $this->configuration['test_engine_setting'], - '#description' => $this->t('Test setting'), - ]; - $form['test_engine_suffix'] = [ - '#title' => $this->t('Suffix'), - '#type' => 'textfield', - '#default_value' => $this->configuration['test_engine_suffix'], - '#description' => $this->t('Suffix'), - ]; - return $form; - } - - /** - * {@inheritdoc} - */ - public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { - $this->configuration['test_engine_setting'] = $form_state->getValue('test_engine_setting'); - $this->configuration['test_engine_suffix'] = $form_state->getValue('test_engine_suffix'); - } - - - /** - * {@inheritdoc} - */ - public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { - if ($form_state->getValue('test_engine_setting') === 'rejected') { - $form_state->setErrorByName('test_engine_setting', 'Setting has an invalid value'); - } - } - - /** - * {@inheritdoc} - */ - public function defaultConfiguration() { - return [ - 'test_engine_setting' => '', - 'test_engine_suffix' => '', - ]; - } - - /** - * {@inheritdoc} - */ - public function getError() {} - - /** - * {@inheritdoc} - */ - public function addPage($content) { - $this->html = $content; - } - - /** - * {@inheritdoc} - */ - public static function dependenciesAvailable() { - return TRUE; - } - -} diff --git a/tests/modules/entity_print_test/src/Plugin/EntityPrint/PrintEngine/NotAvailablePrintEngine.php b/tests/modules/entity_print_test/src/Plugin/EntityPrint/PrintEngine/NotAvailablePrintEngine.php new file mode 100644 index 0000000..8323af6 --- /dev/null +++ b/tests/modules/entity_print_test/src/Plugin/EntityPrint/PrintEngine/NotAvailablePrintEngine.php @@ -0,0 +1,36 @@ +configuration['test_engine_suffix']; + echo $this->html; + flush(); + } + + /** + * {@inheritdoc} + */ + public function buildConfigurationForm(array $form, FormStateInterface $form_state) { + $form = parent::buildConfigurationForm($form, $form_state); + + $form['test_engine_setting'] = [ + '#title' => $this->t('Test setting'), + '#type' => 'textfield', + '#default_value' => $this->configuration['test_engine_setting'], + '#description' => $this->t('Test setting'), + ]; + $form['test_engine_suffix'] = [ + '#title' => $this->t('Suffix'), + '#type' => 'textfield', + '#default_value' => $this->configuration['test_engine_suffix'], + '#description' => $this->t('Suffix'), + ]; + return $form; + } + + /** + * {@inheritdoc} + */ + public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { + $this->configuration['test_engine_setting'] = $form_state->getValue('test_engine_setting'); + $this->configuration['test_engine_suffix'] = $form_state->getValue('test_engine_suffix'); + } + + + /** + * {@inheritdoc} + */ + public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { + if ($form_state->getValue('test_engine_setting') === 'rejected') { + $form_state->setErrorByName('test_engine_setting', 'Setting has an invalid value'); + } + } + + /** + * {@inheritdoc} + */ + public function defaultConfiguration() { + return [ + 'test_engine_setting' => '', + 'test_engine_suffix' => '', + ]; + } + + /** + * {@inheritdoc} + */ + public function getError() {} + + /** + * {@inheritdoc} + */ + public function addPage($content) { + $this->html = $content; + } + + /** + * {@inheritdoc} + */ + public static function dependenciesAvailable() { + return TRUE; + } + +}