Skip to content
Snippets Groups Projects
Commit c5c8d7e0 authored by Eric Bremner's avatar Eric Bremner Committed by Igor Biki
Browse files

ISTWCMS-4166: first attempting at adding the confirmation form for unpublishing

parent a59e1940
No related branches found
No related tags found
1 merge request!8Feature/istwcms 4166 publish unpublish
<?php
namespace Drupal\uw_cfg_common\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\uw_cfg_common\UwPermissions\UwPermissions;
/**
* Form class for the content access form.
*/
class UwContentModerationForm extends FormBase {
/**
* {@inheritdoc}
*/
public function getFormId() {
return 'uw_content_moderation_form';
}
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state, $nid = NULL, $vid = NULL) {
$form = [];
return $form;
}
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
// Set the message that the permissions have been saved.
$this->messenger()->addStatus($this->t('The changes have been saved.'));
}
}
...@@ -5,3 +5,10 @@ uw_contact_access.form: ...@@ -5,3 +5,10 @@ uw_contact_access.form:
_form: '\Drupal\uw_cfg_common\Form\UwContentAccessForm' _form: '\Drupal\uw_cfg_common\Form\UwContentAccessForm'
requirements: requirements:
_permission: 'access content access form' _permission: 'access content access form'
uw_content_moderation.form:
path: '/admin/uw-content-moderation/{nid}/{vid}'
defaults:
_title: 'Content moderation'
_form: '\Drupal\uw_cfg_common\Form\UwContentModerationForm'
requirements:
_permission: 'access content'
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment