Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
drupal.org
field_collection
Commits
d0b4558f
Commit
d0b4558f
authored
Mar 06, 2015
by
Chi
Committed by
Joel Muzzerall
Mar 06, 2015
Browse files
Issue #1935942 by Chi: Implemented hook_admin_menu_map()
parent
f2faa90d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
field_collection.module
field_collection.module
+15
-0
No files found.
field_collection.module
View file @
d0b4558f
...
...
@@ -1489,3 +1489,18 @@ function field_collection_devel_generate($object, $field, $instance, $bundle) {
function
field_collection_hide_blank_items
(
$field
)
{
return
!
empty
(
$field
[
'settings'
][
'hide_blank_items'
])
&&
$field
[
'cardinality'
]
==
FIELD_CARDINALITY_UNLIMITED
;
}
/**
* Implements hook_admin_menu_map().
*/
function
field_collection_admin_menu_map
()
{
if
(
user_access
(
'administer field collections'
))
{
$map
[
'admin/structure/field-collections/%field_collection_field_name'
]
=
array
(
'parent'
=>
'admin/structure/field-collections'
,
'arguments'
=>
array
(
array
(
'%field_collection_field_name'
=>
array_keys
(
field_read_fields
(
array
(
'type'
=>
'field_collection'
)))),
),
);
return
$map
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment