Skip to content
GitLab
Explore
Sign in
project
drupal
Compare revisions
92f93a1cbc2b331e4427efe8ca7674fb503c33a3 to 8.0-alpha6
Hide whitespace changes
Inline
Side-by-side
core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint_group.theme.breakpoint_test_theme.breakpoint_test_theme.yml
0 → 100644
View file @
172cd265
id
:
theme.breakpoint_test_theme.breakpoint_test_theme
uuid
:
94b96e6e-a032-4b29-8100-efd5bf854fd1
name
:
breakpoint_test_theme
label
:
'
Breakpoint
test
theme'
breakpoint_ids
:
-
theme.breakpoint_test_theme.mobile
-
theme.breakpoint_test_theme.narrow
-
theme.breakpoint_test_theme.wide
-
theme.breakpoint_test_theme.tv
source
:
breakpoint_test_theme
sourceType
:
theme
status
:
true
langcode
:
en
core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint_group.theme.breakpoint_test_theme.test.yml
0 → 100644
View file @
172cd265
id
:
theme.breakpoint_test_theme.test
uuid
:
fcc25180-7e18-4149-8962-98d706faa59a
name
:
test
label
:
'
Test
Theme'
breakpoint_ids
:
-
theme.breakpoint_test_theme.mobile
-
theme.breakpoint_test_theme.narrow
-
theme.breakpoint_test_theme.wide
source
:
breakpoint_test_theme
sourceType
:
theme
status
:
true
langcode
:
en
core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint_test_theme.breakpoint_groups.yml
deleted
100644 → 0
View file @
92f93a1c
test
:
label
:
Test Theme
breakpoints
:
-
mobile
-
narrow
-
wide
core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint_test_theme.breakpoints.yml
deleted
100644 → 0
View file @
92f93a1c
mobile
:
'
(min-width:
0px)'
narrow
:
'
(min-width:
560px)'
wide
:
'
(min-width:
851px)'
tv
:
'
only
screen
and
(min-width:
3456px)'
core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/Editor/CKEditor.php
View file @
172cd265
...
...
@@ -320,9 +320,9 @@ public function getLangcodes() {
if
(
empty
(
$langcodes
))
{
$langcodes
=
array
();
// Collect languages included with CKEditor based on file listing.
$ckeditor_languages
=
new
\GlobIterator
(
DRUPAL_ROOT
.
'/core/assets/vendor/ckeditor/lang/*.js'
);
foreach
(
$ckeditor_languages
as
$language_file
)
{
$langcode
=
$language_file
->
getBase
name
(
'.js'
);
$ckeditor_languages
=
glob
(
DRUPAL_ROOT
.
'/core/assets/vendor/ckeditor/lang/*.js'
);
foreach
(
$ckeditor_languages
as
$language_file
name
)
{
$langcode
=
basename
(
$language_filename
,
'.js'
);
$langcodes
[
$langcode
]
=
$langcode
;
}
cache
(
'ckeditor.languages'
)
->
set
(
'langcodes'
,
$langcodes
);
...
...
core/modules/comment/comment.module
View file @
172cd265
...
...
@@ -1731,3 +1731,20 @@ function comment_library_info() {
);
return
$libraries
;
}
/**
* #post_render_cache callback; replaces the placeholder with the comment form.
*
* @param array $context
* An array with the following keys:
* - entity_type: an entity type
* - entity_id: an entity ID
* - field_name: a comment field name
*
* @return array $element
* The updated $element.
*/
function
comment_replace_form_placeholder
(
array
$context
)
{
$entity
=
entity_load
(
$context
[
'entity_type'
],
$context
[
'entity_id'
]);
return
comment_add
(
$entity
,
$context
[
'field_name'
]);
}
core/modules/comment/comment.views.inc
View file @
172cd265
...
...
@@ -2,9 +2,7 @@
/**
* @file
* Provide views data and handlers for comment.module.
*
* @ingroup views_module_handlers
* Provide views data for comment.module.
*/
/**
...
...
core/modules/comment/lib/Drupal/comment/Entity/Comment.php
View file @
172cd265
...
...
@@ -36,7 +36,6 @@
* fieldable = TRUE,
* translatable = TRUE,
* render_cache = FALSE,
* route_base_path = "admin/structure/comments/manage/{bundle}",
* entity_keys = {
* "id" = "cid",
* "bundle" = "field_id",
...
...
@@ -48,7 +47,8 @@
* },
* links = {
* "canonical" = "comment.permalink",
* "edit-form" = "comment.edit_page"
* "edit-form" = "comment.edit_page",
* "admin-form" = "comment.bundle"
* }
* )
*/
...
...
core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
View file @
172cd265
...
...
@@ -138,7 +138,24 @@ public function viewElements(FieldItemListInterface $items) {
if
(
$status
==
COMMENT_OPEN
&&
$comment_settings
[
'form_location'
]
==
COMMENT_FORM_BELOW
)
{
// Only show the add comment form if the user has permission.
if
(
$this
->
currentUser
->
hasPermission
(
'post comments'
))
{
$output
[
'comment_form'
]
=
comment_add
(
$entity
,
$field_name
);
// All users in the "anonymous" role can use the same form: it is fine
// for this form to be stored in the render cache.
if
(
$this
->
currentUser
->
isAnonymous
())
{
$output
[
'comment_form'
]
=
comment_add
(
$entity
,
$field_name
);
}
// All other users need a user-specific form, which would break the
// render cache: hence use a #post_render_cache callback.
else
{
$output
[
'comment_form'
]
=
array
(
'#type'
=>
'render_cache_placeholder'
,
'#callback'
=>
'comment_replace_form_placeholder'
,
'#context'
=>
array
(
'entity_type'
=>
$entity
->
entityType
(),
'entity_id'
=>
$entity
->
id
(),
'field_name'
=>
$field_name
),
);
}
}
}
...
...
core/modules/comment/lib/Drupal/comment/Tests/CommentNonNodeTest.php
View file @
172cd265
...
...
@@ -229,11 +229,11 @@ function testCommentFunctionality() {
));
$this
->
drupalLogin
(
$limited_user
);
// Test that default field exists.
$this
->
drupalGet
(
'
admin/structure/
entity
-
test/
manag
e/entity_test/fields'
);
$this
->
drupalGet
(
'entity
_
test/
structur
e/entity_test/fields'
);
$this
->
assertText
(
t
(
'Comment settings'
));
$this
->
assertLinkByHref
(
'
admin/structure/
entity
-
test/
manag
e/entity_test/fields/entity_test.entity_test.comment'
);
$this
->
assertLinkByHref
(
'entity
_
test/
structur
e/entity_test/fields/entity_test.entity_test.comment'
);
// Test widget hidden option is not visible when there's no comments.
$this
->
drupalGet
(
'
admin/structure/
entity
-
test/
manag
e/entity_test/entity-test/fields/entity_test.entity_test.comment'
);
$this
->
drupalGet
(
'entity
_
test/
structur
e/entity_test/entity-test/fields/entity_test.entity_test.comment'
);
$this
->
assertNoField
(
'edit-default-value-input-comment-und-0-status-0'
);
$this
->
drupalLogin
(
$this
->
admin_user
);
...
...
@@ -343,20 +343,20 @@ function testCommentFunctionality() {
'administer entity_test content'
,
));
$this
->
drupalLogin
(
$limited_user
);
$this
->
drupalGet
(
'
admin/structure/
entity
-
test/
manag
e/entity_test/fields/entity_test.entity_test.comment'
);
$this
->
drupalGet
(
'entity
_
test/
structur
e/entity_test/fields/entity_test.entity_test.comment'
);
$this
->
assertNoFieldChecked
(
'edit-default-value-input-comment-0-status-0'
);
$this
->
assertNoFieldChecked
(
'edit-default-value-input-comment-0-status-1'
);
$this
->
assertFieldChecked
(
'edit-default-value-input-comment-0-status-2'
);
// Test comment option change in field settings.
$edit
=
array
(
'default_value_input[comment][0][status]'
=>
COMMENT_CLOSED
);
$this
->
drupalPostForm
(
NULL
,
$edit
,
t
(
'Save settings'
));
$this
->
drupalGet
(
'
admin/structure/
entity
-
test/
manag
e/entity_test/fields/entity_test.entity_test.comment'
);
$this
->
drupalGet
(
'entity
_
test/
structur
e/entity_test/fields/entity_test.entity_test.comment'
);
$this
->
assertNoFieldChecked
(
'edit-default-value-input-comment-0-status-0'
);
$this
->
assertFieldChecked
(
'edit-default-value-input-comment-0-status-1'
);
$this
->
assertNoFieldChecked
(
'edit-default-value-input-comment-0-status-2'
);
// Add a new comment field.
$this
->
drupalGet
(
'
admin/structure/
entity
-
test/
manag
e/entity_test/fields'
);
$this
->
drupalGet
(
'entity
_
test/
structur
e/entity_test/fields'
);
$edit
=
array
(
'fields[_add_new_field][label]'
=>
'Foobar'
,
'fields[_add_new_field][field_name]'
=>
'foobar'
,
...
...
core/modules/config_translation/lib/Drupal/config_translation/ConfigFieldInstanceMapper.php
View file @
172cd265
...
...
@@ -23,13 +23,10 @@ class ConfigFieldInstanceMapper extends ConfigEntityMapper {
*/
public
function
getBaseRouteParameters
()
{
$parameters
=
parent
::
getBaseRouteParameters
();
// @todo All core content entity path placeholders can be fully filled in
// with an additional {bundle} value in their paths, but a more
// predictable solution would be ideal. See
// https://drupal.org/node/2134871
$base_entity_info
=
$this
->
entityManager
->
getDefinition
(
$this
->
pluginDefinition
[
'base_entity_type'
]);
// @todo Field instances have no method to return the bundle the instance is
// attached to. See https://drupal.org/node/2134861
$parameters
[
'bundle'
]
=
$this
->
entity
->
bundle
;
$parameters
[
$base_entity_info
[
'bundle_entity_type'
]
]
=
$this
->
entity
->
bundle
;
return
$parameters
;
}
...
...
core/modules/contact/contact.local_tasks.yml
0 → 100644
View file @
172cd265
contact.category_edit
:
title
:
'
Edit'
route_name
:
contact.category_edit
tab_root_id
:
contact.category_edit
core/modules/contact/contact.module
View file @
172cd265
...
...
@@ -67,10 +67,6 @@ function contact_menu() {
'title'
=>
'Edit contact category'
,
'route_name'
=>
'contact.category_edit'
,
);
$items
[
'admin/structure/contact/manage/%contact_category/edit'
]
=
array
(
'title'
=>
'Edit'
,
'type'
=>
MENU_DEFAULT_LOCAL_TASK
,
);
$items
[
'contact'
]
=
array
(
'title'
=>
'Contact'
,
...
...
core/modules/contact/contact.views.inc
View file @
172cd265
...
...
@@ -3,8 +3,6 @@
/**
* @file
* Provide views data for contact.module.
*
* @ingroup views_module_handlers
*/
/**
...
...
core/modules/contact/lib/Drupal/contact/Entity/Message.php
View file @
172cd265
...
...
@@ -26,10 +26,13 @@
* entity_keys = {
* "bundle" = "category"
* },
*
route_base_path = "admin/structure/contact/manage/{bundle}
",
*
bundle_entity_type = "contact_category
",
* fieldable = TRUE,
* bundle_keys = {
* "bundle" = "id"
* },
* links = {
* "admin-form" = "contact.category_edit"
* }
* )
*/
...
...
core/modules/content_translation/content_translation.module
View file @
172cd265
...
...
@@ -156,7 +156,7 @@ function content_translation_menu() {
if
(
content_translation_enabled
(
$entity_type
))
{
$path
=
_content_translation_link_to_router_path
(
$entity_type
,
$info
[
'links'
][
'canonical'
]);
$entity_position
=
count
(
explode
(
'/'
,
$path
))
-
1
;
$keys
=
array_flip
(
array
(
'load_arguments'
));
$keys
=
array_flip
(
array
(
'theme_callback'
,
'theme_arguments'
,
'load_arguments'
));
$menu_info
=
array_intersect_key
(
$info
[
'translation'
][
'content_translation'
],
$keys
)
+
array
(
'file'
=>
'content_translation.pages.inc'
);
$item
=
array
();
...
...
core/modules/contextual/contextual.module
View file @
172cd265
...
...
@@ -6,6 +6,21 @@
* Adds contextual links to perform actions related to elements on a page.
*/
/**
* Implements hook_menu().
*/
function
contextual_menu
()
{
// @todo Remove this menu item in http://drupal.org/node/1954892 when theme
// callbacks are replaced with something else.
$items
[
'contextual/render'
]
=
array
(
'route_name'
=>
'contextual.render'
,
'theme callback'
=>
'ajax_base_page_theme'
,
'type'
=>
MENU_CALLBACK
,
);
return
$items
;
}
/**
* Implements hook_toolbar().
*/
...
...
core/modules/contextual/contextual.routing.yml
View file @
172cd265
...
...
@@ -2,7 +2,5 @@ contextual.render:
path
:
'
/contextual/render'
defaults
:
_controller
:
'
\Drupal\contextual\ContextualController::render'
options
:
_theme
:
ajax_base_page
requirements
:
_permission
:
'
access
contextual
links'
core/modules/contextual/contextual.views.inc
View file @
172cd265
...
...
@@ -2,9 +2,7 @@
/**
* @file
* Provide views data and handlers for contextual.module.
*
* @ingroup views_module_handlers
* Provide views data for contextual.module.
*/
/**
...
...
core/modules/contextual/css/contextual.theme.css
View file @
172cd265
...
...
@@ -91,9 +91,7 @@
}
.contextual-region
.contextual
.contextual-links
a
{
background-color
:
#fff
;
/* This is an unfortunately necessary use of !important to prevent white
* links on a white background or some similar illegible combination. */
color
:
#333
!important
;
color
:
#333
;
display
:
block
;
font-family
:
sans-serif
;
font-size
:
small
;
...
...
Prev
1
2
3
4
5
6
7
…
11
Next