Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
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
drupal
Commits
fe83dcab
Commit
fe83dcab
authored
12 years ago
by
Damian Lee
Committed by
Tim Plunkett
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1751282
by damiankloip: Create helper function to get list of core modules.
parent
a25e8fed
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
views.module
+26
-2
26 additions, 2 deletions
views.module
with
26 additions
and
2 deletions
views.module
+
26
−
2
View file @
fe83dcab
...
@@ -22,16 +22,40 @@ function views_api_version() {
...
@@ -22,16 +22,40 @@ function views_api_version() {
return
'3.0'
;
return
'3.0'
;
}
}
/**
* Returns a list of Drupal core modules.
*
* @return array
*/
function
views_core_modules
()
{
return
array
(
'aggregator'
,
'book'
,
'comment'
,
'contact'
,
'field'
,
'filter'
,
'file'
,
'locale'
,
'node'
,
'search'
,
'statistics'
,
'system'
,
'taxonomy'
,
'translation'
,
'user'
);
}
/**
/**
* Implements hook_init().
* Implements hook_init().
*
*
*
*
*/
*/
function
views_init
()
{
function
views_init
()
{
$core_modules
=
array
(
'aggregator'
,
'book'
,
'comment'
,
'contact'
,
'field'
,
'filter'
,
'file'
,
'locale'
,
'node'
,
'search'
,
'statistics'
,
'system'
,
'taxonomy'
,
'translation'
,
'user'
);
$path
=
drupal_get_path
(
'module'
,
'views'
);
$path
=
drupal_get_path
(
'module'
,
'views'
);
$loader
=
drupal_classloader
();
$loader
=
drupal_classloader
();
foreach
(
$
core_modules
as
$module
)
{
foreach
(
views_
core_modules
()
as
$module
)
{
$function
=
$module
.
'_views_api'
;
$function
=
$module
.
'_views_api'
;
if
(
function_exists
(
$function
))
{
if
(
function_exists
(
$function
))
{
$loader
->
registerNamespace
(
'Views\\'
.
$module
,
DRUPAL_ROOT
.
'/'
.
$path
.
'/lib'
);
$loader
->
registerNamespace
(
'Views\\'
.
$module
,
DRUPAL_ROOT
.
'/'
.
$path
.
'/lib'
);
...
...
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