Commit b7040f3f authored by StryKaizer's avatar StryKaizer

Display operation added in facet overview page

parent d6bce1c3
......@@ -4,5 +4,5 @@ entity.facetapi_facet.edit_form:
base_route: entity.facetapi_facet.edit_form
entity.facetapi_facet.display:
title: 'Display'
route_name: entity.facetapi_facet.display
route_name: entity.facetapi_facet.display_form
base_route: entity.facetapi_facet.edit_form
\ No newline at end of file
......@@ -37,7 +37,7 @@ entity.facetapi_facet.delete_form:
requirements:
_entity_access: 'facetapi_facet.delete'
entity.facetapi_facet.display:
entity.facetapi_facet.display_form:
path: '/admin/config/search/facet-api/{facetapi_facet}/display'
defaults:
_entity_form: 'facetapi_facet.display'
......
......@@ -51,6 +51,7 @@ use Drupal\facetapi\FacetInterface;
* "canonical" = "/admin/config/search/facet-api",
* "add-form" = "/admin/config/search/facet-api/add-facet",
* "edit-form" = "/admin/config/search/facet-api/{facetapi_facet}/edit",
* "display-form" = "/admin/config/search/facet-api/{facetapi_facet}/display",
* "delete-form" = "/admin/config/search/facet-api/{facetapi_facet}/delete",
* }
* )
......
......@@ -41,6 +41,13 @@ class FacetListBuilder extends ConfigEntityListBuilder {
'url' => $entity->urlInfo('edit-form'),
);
}
if ($entity->access('update') && $entity->hasLinkTemplate('display-form')) {
$operations['display'] = array(
'title' => $this->t('Display'),
'weight' => 20,
'url' => $entity->urlInfo('display-form'),
);
}
if ($entity->access('delete') && $entity->hasLinkTemplate('delete-form')) {
$operations['delete'] = array(
'title' => $this->t('Delete'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment