Skip to content
Snippets Groups Projects
Commit 062d8f64 authored by Nidhi Patadia's avatar Nidhi Patadia Committed by Steve Wirt
Browse files

Issue #3426619 by nidhi27, swirt: Make edit column on field report contingent on Field UI

parent cd60924b
No related branches found
No related tags found
1 merge request!26Make edit column on field report contingent on Field UI.
......@@ -11,6 +11,7 @@ use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\markdown\Markdown;
use Drupal\views\ViewExecutable;
/**
* Implements hook_form_FORM_alter().
......@@ -118,3 +119,15 @@ function content_model_documentation_theme_suggestions_content_model_documentati
return $suggestions;
}
/**
* Implements hook_views_pre_render().
*/
function content_model_documentation_views_pre_render(ViewExecutable $view) {
if ($view->id() == 'content_model_fields' && $view->current_display == 'content_model_documentation_fields') {
$field_id = 'non_delete_operations';
if (isset($view->field[$field_id]) && !(\Drupal::moduleHandler()->moduleExists('field_ui'))) {
unset($view->field[$field_id]);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment