ViewRevisionsFormAlter.php in Config Entity Revisions 8.2
File
modules/view_revisions/src/ViewRevisionsFormAlter.php
View source
<?php
namespace Drupal\view_revisions;
use Drupal\config_entity_revisions\ConfigEntityRevisionsFormAlterBase;
use Drupal\config_entity_revisions\ConfigEntityRevisionsFormAlterInterface;
class ViewRevisionsFormAlter extends ConfigEntityRevisionsFormAlterBase implements ConfigEntityRevisionsFormAlterInterface {
public static function getRouteParameterName() {
return 'view';
}
public static function getAddFormRoutes() {
return [
'entity.view.revision',
];
}
public static function getEditFormRoutes() {
return [
'entity.view.edit_form',
'entity.view.edit_display_form',
'entity.view.revision',
'views_ui.form_add_handler',
'views_ui.form_edit_details',
'views_ui.form_reorder_displays',
'views_ui.form_analyze',
'views_ui.form_rearrange',
'views_ui.form_rearrange_filter',
'views_ui.form_display',
'views_ui.form_handler',
'views_ui.form_handler_extra',
'views_ui.form_handler_group',
];
}
public static function getNewRevisionRoutes() {
return [
'entity.view.edit_form',
];
}
public static function getViewFormRoutes() {
return [
'entity.view.edit_display_form',
'entity.view.preview_form',
];
}
public static function getRevisionRoutes() {
return array_merge(self::getAddFormRoutes(), self::getEditFormRoutes(), self::getViewFormRoutes(), [
'view_ui_element_form',
]);
}
}