Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
1a10539f
Commit
1a10539f
authored
Aug 26, 2014
by
webchick
Browse files
git commit -m Issue
parent
da94c06e
Changes
5
Hide whitespace changes
Inline
Side-by-side
core/includes/theme.inc
View file @
1a10539f
...
...
@@ -2223,10 +2223,14 @@ function template_preprocess_field_multiple_value_form(&$variables) {
if
(
$variables
[
'multiple'
])
{
$table_id
=
drupal_html_id
(
$element
[
'#field_name'
]
.
'_values'
);
$order_class
=
$element
[
'#field_name'
]
.
'-delta-order'
;
$header_attributes
=
new
Attribute
(
array
(
'class'
=>
array
(
'label'
)));
if
(
!
empty
(
$element
[
'#required'
]))
{
$header_attributes
[
'class'
][]
=
'form-required'
;
}
$header
=
array
(
array
(
'data'
=>
array
(
'#prefix'
=>
'<h4
class="label"
>'
,
'#prefix'
=>
'<h4
'
.
$header_attributes
.
'
>'
,
'title'
=>
array
(
'#markup'
=>
t
(
$element
[
'#title'
]),
),
...
...
@@ -2237,12 +2241,6 @@ function template_preprocess_field_multiple_value_form(&$variables) {
),
t
(
'Order'
,
array
(),
array
(
'context'
=>
'Sort order'
)),
);
if
(
!
empty
(
$element
[
'#required'
]))
{
$header
[
0
][
'data'
][
'required'
]
=
array
(
'#theme'
=>
'form_required_marker'
,
'#element'
=>
$element
,
);
}
$rows
=
array
();
// Sort items according to '_weight' (needed when the form comes back after
...
...
core/modules/block_content/src/BlockContentViewBuilder.php
View file @
1a10539f
...
...
@@ -16,6 +16,17 @@
*/
class
BlockContentViewBuilder
extends
EntityViewBuilder
{
/**
* {@inheritdoc}
*/
protected
function
getBuildDefaults
(
EntityInterface
$entity
,
$view_mode
,
$langcode
)
{
$build
=
parent
::
getBuildDefaults
(
$entity
,
$view_mode
,
$langcode
);
// The custom block will be rendered in the wrapped block template already
// and thus has no entity template itself.
unset
(
$build
[
'#theme'
]);
return
$build
;
}
/**
* {@inheritdoc}
*/
...
...
core/modules/contact/src/MessageViewBuilder.php
View file @
1a10539f
...
...
@@ -17,6 +17,17 @@
*/
class
MessageViewBuilder
extends
EntityViewBuilder
{
/**
* {@inheritdoc}
*/
protected
function
getBuildDefaults
(
EntityInterface
$entity
,
$view_mode
,
$langcode
)
{
$build
=
parent
::
getBuildDefaults
(
$entity
,
$view_mode
,
$langcode
);
// The message fields are individually rendered into email templates, so
// the entity has no template itself.
unset
(
$build
[
'#theme'
]);
return
$build
;
}
/**
* {@inheritdoc}
*/
...
...
core/modules/system/src/Tests/Theme/FunctionsTest.php
View file @
1a10539f
...
...
@@ -64,7 +64,6 @@ function testItemList() {
// Verify that title set to a render array is output.
$variables
=
array
();
$variables
[
'title'
]
=
array
(
'#theme'
=>
'markup'
,
'#markup'
=>
'<span>Render array</span>'
,
);
$variables
[
'empty'
]
=
'No items found.'
;
...
...
core/modules/system/tests/modules/entity_test/src/EntityTestViewBuilder.php
View file @
1a10539f
...
...
@@ -8,6 +8,7 @@
namespace
Drupal\entity_test
;
use
Drupal\Component\Utility\String
;
use
Drupal\Core\Entity\EntityInterface
;
use
Drupal\Core\Entity\EntityViewBuilder
;
/**
...
...
@@ -17,6 +18,15 @@
*/
class
EntityTestViewBuilder
extends
EntityViewBuilder
{
/**
* {@inheritdoc}
*/
protected
function
getBuildDefaults
(
EntityInterface
$entity
,
$view_mode
,
$langcode
)
{
$build
=
parent
::
getBuildDefaults
(
$entity
,
$view_mode
,
$langcode
);
unset
(
$build
[
'#theme'
]);
return
$build
;
}
/**
* {@inheritdoc}
*/
...
...
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