Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
310
Merge Requests
310
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
6315275a
Commit
6315275a
authored
Nov 17, 2015
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2607294
by andypost: Fix entity.api bundle examples
parent
50de1d6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
core/lib/Drupal/Core/Entity/entity.api.php
core/lib/Drupal/Core/Entity/entity.api.php
+5
-5
No files found.
core/lib/Drupal/Core/Entity/entity.api.php
View file @
6315275a
...
...
@@ -1916,16 +1916,16 @@ function hook_entity_extra_field_info() {
// Visibility of the ordering of the language selector is the same as on the
// node/add form.
if
(
$module_language_enabled
)
{
$configuration
=
ContentLanguageSettings
::
loadByEntityTypeBundle
(
'node'
,
$bundle
->
type
);
$configuration
=
ContentLanguageSettings
::
loadByEntityTypeBundle
(
'node'
,
$bundle
->
id
()
);
if
(
$configuration
->
isLanguageAlterable
())
{
$extra
[
'node'
][
$bundle
->
type
][
'form'
][
'language'
]
=
array
(
$extra
[
'node'
][
$bundle
->
id
()
][
'form'
][
'language'
]
=
array
(
'label'
=>
t
(
'Language'
),
'description'
=>
$description
,
'weight'
=>
0
,
);
}
}
$extra
[
'node'
][
$bundle
->
type
][
'display'
][
'language'
]
=
array
(
$extra
[
'node'
][
$bundle
->
id
()
][
'display'
][
'language'
]
=
array
(
'label'
=>
t
(
'Language'
),
'description'
=>
$description
,
'weight'
=>
0
,
...
...
@@ -1948,8 +1948,8 @@ function hook_entity_extra_field_info() {
function
hook_entity_extra_field_info_alter
(
&
$info
)
{
// Force node title to always be at the top of the list by default.
foreach
(
NodeType
::
loadMultiple
()
as
$bundle
)
{
if
(
isset
(
$info
[
'node'
][
$bundle
->
type
][
'form'
][
'title'
]))
{
$info
[
'node'
][
$bundle
->
type
][
'form'
][
'title'
][
'weight'
]
=
-
20
;
if
(
isset
(
$info
[
'node'
][
$bundle
->
id
()
][
'form'
][
'title'
]))
{
$info
[
'node'
][
$bundle
->
id
()
][
'form'
][
'title'
][
'weight'
]
=
-
20
;
}
}
}
...
...
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