class ViewRevisionsFormAlter in Config Entity Revisions 8.2
Class ViewRevisionsFormAlter.
@package Drupal\view_revisions
Hierarchy
- class \Drupal\config_entity_revisions\ConfigEntityRevisionsFormAlterBase implements ConfigEntityRevisionsFormAlterInterface
- class \Drupal\view_revisions\ViewRevisionsFormAlter implements ConfigEntityRevisionsFormAlterInterface
Expanded class hierarchy of ViewRevisionsFormAlter
1 file declares its use of ViewRevisionsFormAlter
- view_revisions.module in modules/
view_revisions/ view_revisions.module - view_revisions hook functions.
File
- modules/
view_revisions/ src/ ViewRevisionsFormAlter.php, line 13
Namespace
Drupal\view_revisionsView source
class ViewRevisionsFormAlter extends ConfigEntityRevisionsFormAlterBase implements ConfigEntityRevisionsFormAlterInterface {
/**
* Route parameter name.
*
* @return string
* The name of the route parameter used to access the config entity.
*/
public static function getRouteParameterName() {
return 'view';
}
/**
* ViewRevisions routes that provide an add form.
*
* @return array
* ViewRevisions routes that provide an add form.
*/
public static function getAddFormRoutes() {
return [
'entity.view.revision',
];
}
/**
* ViewRevisions routes that provide add or edit forms.
*
* @return array
* ViewRevisions routes that provide add or edit forms.
*/
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',
];
}
/**
* ViewRevisions routes that get new revision form fields.
*
* @return array
* ViewRevisions routes that provide add or edit forms.
*/
public static function getNewRevisionRoutes() {
return [
'entity.view.edit_form',
];
}
/**
* ViewRevisions routes that view the entity.
*
* @return array
* ViewRevisions routes that view the entity.
*/
public static function getViewFormRoutes() {
return [
'entity.view.edit_display_form',
'entity.view.preview_form',
];
}
/**
* Additional routes (to $add_edit_form_routes) that need a revision id.
*
* @return array
* Additional routes (to $add_edit_form_routes) that need a revision id.
*/
public static function getRevisionRoutes() {
return array_merge(self::getAddFormRoutes(), self::getEditFormRoutes(), self::getViewFormRoutes(), [
'view_ui_element_form',
]);
}
}