Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
field_collection
Commits
741a18b2
Commit
741a18b2
authored
Sep 27, 2020
by
Ra Mänd
Browse files
Coding standard fixes.
parent
c8eea2ef
Changes
6
Hide whitespace changes
Inline
Side-by-side
field_collection.info.inc
View file @
741a18b2
...
...
@@ -32,7 +32,7 @@ class FieldCollectionItemMetadataController extends EntityDefaultMetadataControl
foreach
(
$bundles
as
$bundle
=>
$fields
)
{
if
(
array_intersect_key
(
$fields
,
$field_collection_fields
))
{
$args
=
array
(
'@type'
=>
$entity_types
[
$entity_type
][
'label'
]);
$properties
[
"host_entity_
$entity_type
"
]
=
array
(
$properties
[
"host_entity_
{
$entity_type
}
"
]
=
array
(
'label'
=>
t
(
'Host entity (@type)'
,
$args
),
'type'
=>
$entity_type
,
'description'
=>
t
(
'The @type containing the field collection field (empty if this field collection is attached to an item of a different type).'
,
$args
),
...
...
field_collection.module
View file @
741a18b2
<?php
/**
* @file
* Module implementing field collection field type.
...
...
@@ -2449,7 +2448,6 @@ function field_collection_file_feeds_set_target($source, $entity, $target, $valu
}
/**
* Implementation of hook_feeds_presave().
*
...
...
field_collection.pages.inc
View file @
741a18b2
...
...
@@ -86,7 +86,7 @@ function field_collection_item_delete_confirm($form, &$form_state, $field_collec
*/
function
field_collection_item_delete_confirm_submit
(
$form
,
&
$form_state
)
{
$field_collection_item
=
$form_state
[
'field_collection_item'
];
entity_delete
(
'field_collection_item'
,
$field_collection_item
->
item_id
);
entity_delete
(
'field_collection_item'
,
$field_collection_item
->
item_id
);
drupal_set_message
(
t
(
'%label has been deleted.'
,
array
(
'%label'
=>
drupal_ucfirst
(
$field_collection_item
->
label
()))));
$form_state
[
'redirect'
]
=
'<front>'
;
}
...
...
@@ -129,7 +129,7 @@ function field_collection_item_add($field_name, $entity_type, $entity_id, $revis
$field_collection_item
->
setHostEntity
(
$entity_type
,
$entity
,
$langcode
,
FALSE
);
$label
=
$field_collection_item
->
translatedInstanceLabel
();
$title
=
(
$field
[
'cardinality'
]
==
1
)
?
$label
:
t
(
'Add new !instance_label'
,
array
(
'!instance_label'
=>
$label
));
$title
=
$field
[
'cardinality'
]
==
1
?
$label
:
t
(
'Add new !instance_label'
,
array
(
'!instance_label'
=>
$label
));
drupal_set_title
(
$title
);
// Make sure the current user has access to create a field collection item.
...
...
field_collection.theme.css
View file @
741a18b2
@charset
"UTF-8"
;
.field-collection-container
{
border-bottom
:
1px
solid
#
D3D7D
9
;
border-bottom
:
1px
solid
#
d3d7d
9
;
margin-bottom
:
1em
;
}
...
...
@@ -16,7 +16,7 @@
.field-collection-view
{
padding
:
1em
0
0.3em
0
;
margin
:
0
1em
0
1em
;
border-bottom
:
1px
dotted
#
D3D7D
9
;
border-bottom
:
1px
dotted
#
d3d7d
9
;
}
/* If there is no add link, don't show the final border. */
...
...
field_collection.tokens.inc
View file @
741a18b2
...
...
@@ -66,7 +66,6 @@ function field_collection_token_info_alter(&$data) {
);
}
/**
* Implements hook_tokens().
*/
...
...
views/field_collection_handler_relationship.inc
View file @
741a18b2
...
...
@@ -4,6 +4,7 @@
* @file
* Provide relationship handler for field collection fields.
*/
class
field_collection_handler_relationship
extends
views_handler_relationship
{
function
option_definition
()
{
...
...
Write
Preview
Supports
Markdown
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