Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
content_model_documentation
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
content_model_documentation
Commits
062d8f64
Commit
062d8f64
authored
2 months ago
by
Nidhi Patadia
Committed by
Steve Wirt
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
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
!26
Make edit column on field report contingent on Field UI.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
content_model_documentation.module
+13
-0
13 additions, 0 deletions
content_model_documentation.module
with
13 additions
and
0 deletions
content_model_documentation.module
+
13
−
0
View file @
062d8f64
...
...
@@ -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
]);
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment