Loading modules/wse_config/src/Entity/WseConfig.php +0 −4 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ use Drupal\wse_config\WseConfigInterface; * "views_data" = "Drupal\views\EntityViewsData", * "access" = "Drupal\wse_config\WseConfigAccessControlHandler", * "form" = { * "add" = "Drupal\wse_config\Form\WseConfigForm", * "edit" = "Drupal\wse_config\Form\WseConfigForm", * "delete" = "Drupal\Core\Entity\ContentEntityDeleteForm" * }, * "route_provider" = { Loading Loading @@ -51,9 +49,7 @@ use Drupal\wse_config\WseConfigInterface; * "revision_log_message" = "revision_log_message" * }, * links = { * "add-form" = "/admin/config/development/configuration/config-content/add", * "canonical" = "/wse-config/{wse_config}", * "edit-form" = "/admin/config/development/configuration/config-content/{wse_config}/edit", * "delete-form" = "/admin/config/development/configuration/config-content/{wse_config}/delete", * "collection" = "/admin/config/development/configuration/config-content" * }, Loading modules/wse_config/src/Form/WseConfigForm.phpdeleted 100644 → 0 +0 −37 Original line number Diff line number Diff line <?php namespace Drupal\wse_config\Form; use Drupal\Core\Entity\ContentEntityForm; use Drupal\Core\Form\FormStateInterface; /** * Form controller for the wse_config entity edit forms. */ class WseConfigForm extends ContentEntityForm { /** * {@inheritdoc} */ public function save(array $form, FormStateInterface $form_state) { $entity = $this->getEntity(); $result = $entity->save(); $link = $entity->toLink($this->t('View'))->toRenderable(); $message_arguments = ['%label' => $this->entity->label()]; $logger_arguments = $message_arguments + ['link' => render($link)]; if ($result == SAVED_NEW) { $this->messenger()->addStatus($this->t('New wse config %label has been created.', $message_arguments)); $this->logger('wse_config')->notice('Created new wse config %label', $logger_arguments); } else { $this->messenger()->addStatus($this->t('The wse config %label has been updated.', $message_arguments)); $this->logger('wse_config')->notice('Updated new wse config %label.', $logger_arguments); } $form_state->setRedirect('entity.wse_config.canonical', ['wse_config' => $entity->id()]); } } modules/wse_config/wse_config.links.action.ymldeleted 100644 → 0 +0 −5 Original line number Diff line number Diff line wse_config.add_form: route_name: entity.wse_config.add_form title: 'Add workspace config' appears_on: - entity.wse_config.collection modules/wse_config/wse_config.links.task.yml +0 −4 Original line number Diff line number Diff line Loading @@ -2,10 +2,6 @@ entity.wse_config.view: title: View route_name: entity.wse_config.canonical base_route: entity.wse_config.canonical entity.wse_config.edit_form: title: Edit route_name: entity.wse_config.edit_form base_route: entity.wse_config.canonical entity.wse_config.delete_form: title: Delete route_name: entity.wse_config.delete_form Loading Loading
modules/wse_config/src/Entity/WseConfig.php +0 −4 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ use Drupal\wse_config\WseConfigInterface; * "views_data" = "Drupal\views\EntityViewsData", * "access" = "Drupal\wse_config\WseConfigAccessControlHandler", * "form" = { * "add" = "Drupal\wse_config\Form\WseConfigForm", * "edit" = "Drupal\wse_config\Form\WseConfigForm", * "delete" = "Drupal\Core\Entity\ContentEntityDeleteForm" * }, * "route_provider" = { Loading Loading @@ -51,9 +49,7 @@ use Drupal\wse_config\WseConfigInterface; * "revision_log_message" = "revision_log_message" * }, * links = { * "add-form" = "/admin/config/development/configuration/config-content/add", * "canonical" = "/wse-config/{wse_config}", * "edit-form" = "/admin/config/development/configuration/config-content/{wse_config}/edit", * "delete-form" = "/admin/config/development/configuration/config-content/{wse_config}/delete", * "collection" = "/admin/config/development/configuration/config-content" * }, Loading
modules/wse_config/src/Form/WseConfigForm.phpdeleted 100644 → 0 +0 −37 Original line number Diff line number Diff line <?php namespace Drupal\wse_config\Form; use Drupal\Core\Entity\ContentEntityForm; use Drupal\Core\Form\FormStateInterface; /** * Form controller for the wse_config entity edit forms. */ class WseConfigForm extends ContentEntityForm { /** * {@inheritdoc} */ public function save(array $form, FormStateInterface $form_state) { $entity = $this->getEntity(); $result = $entity->save(); $link = $entity->toLink($this->t('View'))->toRenderable(); $message_arguments = ['%label' => $this->entity->label()]; $logger_arguments = $message_arguments + ['link' => render($link)]; if ($result == SAVED_NEW) { $this->messenger()->addStatus($this->t('New wse config %label has been created.', $message_arguments)); $this->logger('wse_config')->notice('Created new wse config %label', $logger_arguments); } else { $this->messenger()->addStatus($this->t('The wse config %label has been updated.', $message_arguments)); $this->logger('wse_config')->notice('Updated new wse config %label.', $logger_arguments); } $form_state->setRedirect('entity.wse_config.canonical', ['wse_config' => $entity->id()]); } }
modules/wse_config/wse_config.links.action.ymldeleted 100644 → 0 +0 −5 Original line number Diff line number Diff line wse_config.add_form: route_name: entity.wse_config.add_form title: 'Add workspace config' appears_on: - entity.wse_config.collection
modules/wse_config/wse_config.links.task.yml +0 −4 Original line number Diff line number Diff line Loading @@ -2,10 +2,6 @@ entity.wse_config.view: title: View route_name: entity.wse_config.canonical base_route: entity.wse_config.canonical entity.wse_config.edit_form: title: Edit route_name: entity.wse_config.edit_form base_route: entity.wse_config.canonical entity.wse_config.delete_form: title: Delete route_name: entity.wse_config.delete_form Loading