Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
extrafield_views_integration
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
extrafield_views_integration
Commits
3921bda1
Commit
3921bda1
authored
Dec 16, 2012
by
dasRicardo
Browse files
Options
Downloads
Patches
Plain Diff
try to integrate display suite extrafields
parent
75cf9f06
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
extrafield_views_integration.module
+12
-1
12 additions, 1 deletion
extrafield_views_integration.module
with
12 additions
and
1 deletion
extrafield_views_integration.module
+
12
−
1
View file @
3921bda1
...
...
@@ -49,6 +49,7 @@ function _extrafield_views_integration_get_all_entity_types() {
}
}
}
$test
=
ds_get_fields
(
'node'
);
return
$entity_types
;
}
...
...
@@ -63,16 +64,26 @@ function _extrafield_views_integration_get_all_entity_types() {
* Reference for the extra fields array.
*/
function
_extrafield_views_integration_get_extra_fields_for_entity_type
(
$entity_type
,
$bundles
,
&
$extra_fields
)
{
$callback
=
''
;
foreach
(
$bundles
as
$bundle
)
{
$temp_fields
=
field_info_extra_fields
(
$entity_type
,
$bundle
,
'display'
);
if
(
!
empty
(
$temp_fields
))
{
foreach
(
$temp_fields
as
$field_name
=>
$temp_field
)
{
if
(
isset
(
$temp_field
[
'callback'
])
&&
function_exists
(
$temp_field
[
'callback'
]))
{
$callback
=
$temp_field
[
'callback'
];
}
else
{
$callback
=
'extrafield_'
.
$entity_type
.
'_'
.
$bundle
.
'_'
.
$field_name
;
if
(
!
function_exists
(
$callback
))
{
$callback
=
''
;
}
}
if
(
!
empty
(
$callback
))
{
$extra_fields
[
$field_name
]
=
array
(
'entity_type'
=>
$entity_type
,
'label'
=>
$temp_field
[
'label'
],
'description'
=>
$temp_field
[
'description'
],
'callback'
=>
$
temp_field
[
'
callback
'
]
,
'callback'
=>
$callback
,
);
}
}
...
...
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
sign in
to comment