#71: Remove files no longer part of Drupal core in Drupal 8.0.0-beta15.

This commit is contained in:
Pantheon Automation 2015-09-15 11:47:45 -07:00 committed by Greg Anderson
parent f3791f1da3
commit 1ebe18adc2
101 changed files with 0 additions and 9459 deletions

View file

@ -1,448 +0,0 @@
/**
* @file
* Generic theme-independent base styles.
*/
/**
* Autocomplete.
*
* @see autocomplete.js
*/
/* Animated throbber */
.js input.form-autocomplete {
background-image: url(../../../misc/throbber-inactive.png);
background-position: 100% center; /* LTR */
background-repeat: no-repeat;
}
.js[dir="rtl"] input.form-autocomplete {
background-position: 0% center;
}
.js input.form-autocomplete.ui-autocomplete-loading {
background-image: url(../../../misc/throbber-active.gif);
background-position: 100% center; /* LTR */
}
.js[dir="rtl"] input.form-autocomplete.ui-autocomplete-loading {
background-position: 0% center;
}
/**
* Unboxed fieldsets for grouping form elements.
*/
.fieldgroup {
border-width: 0;
padding: 0;
}
/**
* Collapsible details.
*
* @see collapse.js
*/
.js details:not([open]) .details-wrapper {
display: none;
}
/**
* Resizable textareas.
*/
.form-textarea-wrapper textarea {
display: block;
margin: 0;
width: 100%;
box-sizing: border-box;
}
.resize-none {
resize: none;
}
.resize-vertical {
resize: vertical;
min-height: 2em;
}
.resize-horizontal {
resize: horizontal;
max-width: 100%;
}
.resize-both {
resize: both;
max-width: 100%;
min-height: 2em;
}
/**
* TableDrag behavior.
*
* @see tabledrag.js
*/
body.drag {
cursor: move;
}
tr.region-title {
font-weight: bold;
}
tr.region-message {
color: #999;
}
tr.region-populated {
display: none;
}
tr.add-new .tabledrag-changed {
display: none;
}
.draggable a.tabledrag-handle {
cursor: move;
float: left; /* LTR */
height: 1.7em;
margin-left: -1em; /* LTR */
overflow: hidden;
text-decoration: none;
}
[dir="rtl"] .draggable a.tabledrag-handle {
float: right;
margin-right: -1em;
margin-left: 0;
}
a.tabledrag-handle:hover {
text-decoration: none;
}
a.tabledrag-handle .handle {
background: url(../../../misc/icons/787878/move.svg) no-repeat 6px 7px;
height: 14px;
margin: -0.4em 0.5em 0;
padding: 0.42em 0.5em;
width: 14px;
}
a.tabledrag-handle:hover .handle,
a.tabledrag-handle:focus .handle {
background-image: url(../../../misc/icons/000000/move.svg);
}
.touch .draggable td {
padding: 0 10px;
}
.touch .draggable .menu-item__link {
display: inline-block;
padding: 10px 0;
}
.touch a.tabledrag-handle {
height: 44px;
width: 40px;
}
.touch a.tabledrag-handle .handle {
background-position: 40% 19px;
height: 21px;
}
.touch .draggable.drag a.tabledrag-handle .handle {
background-position: 50% -32px;
}
.indentation {
float: left; /* LTR */
height: 1.7em;
margin: -0.4em 0.2em -0.4em -0.4em; /* LTR */
padding: 0.42em 0 0.42em 0.6em; /* LTR */
width: 20px;
}
[dir="rtl"] .indentation {
float: right;
margin: -0.4em -0.4em -0.4em 0.2em;
padding: 0.42em 0.6em 0.42em 0;
}
div.tree-child {
background: url(../../../misc/tree.png) no-repeat 11px center; /* LTR */
}
div.tree-child-last {
background: url(../../../misc/tree-bottom.png) no-repeat 11px center; /* LTR */
}
[dir="rtl"] div.tree-child,
[dir="rtl"] div.tree-child-last {
background-position: -65px center;
}
div.tree-child-horizontal {
background: url(../../../misc/tree.png) no-repeat -11px center;
}
.tabledrag-toggle-weight-wrapper {
text-align: right; /* LTR */
}
[dir="rtl"] .tabledrag-toggle-weight-wrapper {
text-align: left;
}
/**
* TableHeader behavior.
*
* @see tableheader.js
*/
table.sticky-header {
background-color: #fff;
margin-top: 0;
z-index: 500;
top: 0;
}
/**
* Progress behavior.
*
* @see progress.js
*/
.progress {
position: relative;
}
.progress__track {
background-color: #fff;
border: 1px solid;
margin-top: 5px;
max-width: 100%;
min-width: 100px;
height: 16px;
}
.progress__bar {
background-color: #000;
height: 1.5em;
min-width: 3%;
max-width: 100%;
}
.progress__description,
.progress__percentage {
color: #555;
overflow: hidden;
font-size: .875em;
margin-top: 0.2em;
}
.progress__description {
float: left; /* LTR */
}
[dir="rtl"] .progress__description {
float: right;
}
.progress__percentage {
float: right; /* LTR */
}
[dir="rtl"] .progress__percentage {
float: left;
}
.progress--small .progress__track {
height: 7px;
}
.progress--small .progress__bar {
height: 7px;
background-size: 20px 20px;
}
/* Throbber */
.ajax-progress {
display: inline-block;
padding: 1px 5px 2px 5px;
}
[dir="rtl"] .ajax-progress {
float: right;
}
.ajax-progress-throbber .throbber {
background: transparent url(../../../misc/throbber-active.gif) no-repeat 0px center;
display: inline;
padding: 1px 5px 2px;
}
.ajax-progress-throbber .message {
display: inline;
padding: 1px 5px 2px;
}
tr .ajax-progress-throbber .throbber {
margin: 0 2px;
}
.ajax-progress-bar {
width: 16em;
}
/* Full screen throbber */
.ajax-progress-fullscreen {
/* Can't do center:50% middle: 50%, so approximate it for a typical window size. */
left: 49%;
position: fixed;
top: 48.5%;
z-index: 1000;
background-color: #232323;
background-image: url("../../../misc/loading-small.gif");
background-position: center center;
background-repeat: no-repeat;
border-radius: 7px;
height: 24px;
opacity: 0.9;
padding: 4px;
width: 24px;
}
/**
* Inline items.
*/
.container-inline div,
.container-inline label {
display: inline;
}
/* Details contents always need to be rendered as block. */
.container-inline .details-wrapper {
display: block;
}
/* Display form elements horizontally. */
.form--inline .form-item {
float: left; /* LTR */
margin-right: 0.5em; /* LTR */
}
[dir="rtl"] .form--inline .form-item {
float: right;
margin-right: 0;
margin-left: 0.5em;
}
.form--inline .form-item-separator {
margin-top: 2.3em;
margin-right: 1em; /* LTR */
margin-left: 0.5em; /* LTR */
}
[dir="rtl"] .form--inline .form-item-separator {
margin-right: 0.5em;
margin-left: 1em;
}
.form--inline .form-actions {
clear: left; /* LTR */
}
[dir="rtl"] .form--inline .form-actions {
clear: right;
}
/**
* Prevent text wrapping.
*/
.nowrap {
white-space: nowrap;
}
/**
* For anything you want to hide on page load when JS is enabled, so
* that you can use the JS to control visibility and avoid flicker.
*/
.js .js-hide {
display: none;
}
/**
* For anything you want to show on page load only when JS is enabled.
*/
.js-show {
display: none;
}
.js .js-show {
display: block;
}
/**
* Hide elements from all users.
*
* Used for elements which should not be immediately displayed to any user. An
* example would be collapsible details that will be expanded with a click
* from a user. The effect of this class can be toggled with the jQuery show()
* and hide() functions.
*/
.hidden {
display: none;
}
/**
* Hide elements visually, but keep them available for screen readers.
*
* Used for information required for screen reader users to understand and use
* the site where visual display is undesirable. Information provided in this
* manner should be kept concise, to avoid unnecessary burden on the user.
* "!important" is used to prevent unintentional overrides.
*/
.visually-hidden {
position: absolute !important;
clip: rect(1px, 1px, 1px, 1px);
overflow: hidden;
height: 1px;
width: 1px;
word-wrap: normal;
}
/**
* The .focusable class extends the .visually-hidden class to allow
* the element to be focusable when navigated to via the keyboard.
*/
.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
position: static !important;
clip: auto;
overflow: visible;
height: auto;
width: auto;
}
/**
* Hide visually and from screen readers, but maintain layout.
*/
.invisible {
visibility: hidden;
}
/**
* Float clearing.
*
* Based on the micro clearfix hack by Nicolas Gallagher, with the :before
* pseudo selector removed to allow normal top margin collapse.
*
* @see http://nicolasgallagher.com/micro-clearfix-hack
*/
.clearfix:after {
content: "";
display: table;
clear: both;
}
/**
* Text alignment classes.
*/
.text-align-left {
text-align: left;
}
.text-align-right {
text-align: right;
}
.text-align-center {
text-align: center;
}
.text-align-justify {
text-align: justify;
}
/**
* Alignment classes (images, videos, blockquotes ).
*/
.align-left {
float: left;
}
.align-right {
float: right;
}
.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
/*
* Remove browser styles, especially for <buttons> and so on.
*/
.reset-appearance {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: 0 none;
background: transparent;
padding: 0;
margin: 0;
line-height: inherit;
}
/*
* Contain positioned elements.
*/
.position-container {
position: relative;
}

View file

@ -1,616 +0,0 @@
/**
* @file
* Basic styling for common markup.
*/
/**
* Publishing status.
*/
.node--unpublished {
background-color: #fff4f4;
}
/**
* Markup generated by tablesort-indicator.html.twig.
*/
th.is-active img {
display: inline;
}
td.is-active {
background-color: #ddd;
}
/**
* Markup generated by item-list.html.twig.
*/
.item-list .title {
font-weight: bold;
}
.item-list ul {
margin: 0 0 0.75em 0;
padding: 0;
}
.item-list ul li {
margin: 0 0 0.25em 1.5em; /* LTR */
padding: 0;
}
[dir="rtl"] .item-list ul li {
margin: 0 1.5em 0.25em 0;
}
/**
* Markup generated by Form API.
*/
.form-item,
.form-actions {
margin-top: 1em;
margin-bottom: 1em;
}
tr.odd .form-item,
tr.even .form-item {
margin-top: 0;
margin-bottom: 0;
}
.form-composite > .fieldset-wrapper > .description,
.form-item .description {
font-size: 0.85em;
}
label.option {
display: inline;
font-weight: normal;
}
.form-composite > legend,
.label {
display:inline;
font-size: inherit;
font-weight: bold;
margin: 0;
padding: 0;
}
.form-checkboxes .form-item,
.form-radios .form-item {
margin-top: 0.4em;
margin-bottom: 0.4em;
}
.form-type-radio .description,
.form-type-checkbox .description {
margin-left: 2.4em;
}
.marker {
color: #e00;
}
.form-required:after {
content: '';
vertical-align: super;
display: inline-block;
/* Use a background image to prevent screen readers from announcing the text. */
background-image: url(../../../misc/icons/ee0000/required.svg);
background-repeat: no-repeat;
background-size: 6px 6px;
width: 6px;
height: 6px;
margin: 0 0.3em;
}
abbr.tabledrag-changed,
abbr.ajax-changed {
border-bottom: none;
}
.form-item input.error,
.form-item textarea.error,
.form-item select.error {
border: 2px solid red;
}
.button,
.image-button {
margin-left: 1em;
margin-right: 1em;
}
.button:first-child,
.image-button:first-child {
margin-left: 0;
margin-right: 0;
}
/* Inline error messages. */
.form-item--error-message:before {
content: '';
display: inline-block;
height: 14px;
width: 14px;
vertical-align: sub;
background: url(../../../misc/icons/ea2800/error.svg) no-repeat;
background-size: contain;
}
/**
* Inline items.
*/
.container-inline label:after,
.container-inline .label:after {
content: ':';
}
.form-type-radios .container-inline label:after {
content: '';
}
.form-type-radios .container-inline .form-type-radio {
margin: 0 1em;
}
.container-inline .form-actions,
.container-inline.form-actions {
margin-top: 0;
margin-bottom: 0;
}
/**
* Markup generated by #type 'more_link'.
*/
.more-link {
display: block;
text-align: right; /* LTR */
}
[dir="rtl"] .more-link {
text-align: left;
}
/* Style for the help icon. */
.icon-help {
background: url(../../../misc/help.png) 0 50% no-repeat; /* LTR */
padding: 1px 0 1px 20px; /* LTR */
}
[dir="rtl"] .icon-help {
background-position: 100% 50%;
padding: 1px 20px 1px 0;
}
/**
* Feed Icon.
* Markup generated by feed-icon.html.twig.
*/
.feed-icon {
background: url(../../../misc/feed.png) no-repeat;
overflow: hidden;
text-indent: -9999px;
display: block;
width: 16px;
height: 16px;
}
/**
* Markup generated by pager.html.twig.
*/
.pager__items {
clear: both;
text-align: center;
}
.pager__item {
display: inline;
padding: 0.5em;
}
.pager__item.is-active {
font-weight: bold;
}
/**
* Show buttons as links.
*/
button.link {
background: transparent;
border: 0;
cursor: pointer;
margin: 0;
padding: 0;
font-size: 1em;
}
label button.link {
font-weight: bold;
}
/**
* Collapsible details.
*
* @see collapse.js
* @thanks http://nicolasgallagher.com/css-background-image-hacks/
*/
details {
border: 1px solid #ccc;
margin-top: 1em;
margin-bottom: 1em;
}
details > .details-wrapper {
padding: 0.5em 1.5em;
}
/* @todo Regression: The summary of uncollapsible details are no longer
vertically aligned with the .details-wrapper in browsers without native
details support. */
summary {
cursor: pointer;
padding: 0.2em 0.5em;
}
.collapse-processed > summary {
padding-left: 0.5em;
padding-right: 0.5em;
}
.collapse-processed > summary:before {
background: url(../../../misc/menu-expanded.png) 0px 100% no-repeat; /* LTR */
content: "";
float: left;
height: 1em;
width: 1em;
}
[dir="rtl"] .collapse-processed > summary:before {
background-position: 100% 100%;
float: right;
}
.collapse-processed:not([open]) > summary:before {
background-position: 25% 35%; /* LTR */
-ms-transform: rotate(-90deg);
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg);
}
[dir="rtl"] .collapse-processed:not([open]) > summary:before {
background-position: 75% 35%;
-ms-transform: rotate(90deg);
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
}
/**
* TableDrag behavior.
*
* @see tabledrag.js
*/
tr.drag {
background-color: #fffff0;
}
tr.drag-previous {
background-color: #ffd;
}
body div.tabledrag-changed-warning {
margin-bottom: 0.5em;
}
/**
* TableSelect behavior.
*
* @see tableselect.js
*/
tr.selected td {
background: #ffc;
}
td.checkbox,
th.checkbox {
text-align: center;
}
/**
* Progress bar.
*
* @see progress.js
*/
.progress__track {
border-color: #b3b3b3;
border-radius: 10em;
background-color: #f2f1eb;
background-image: -webkit-linear-gradient(#e7e7df, #f0f0f0);
background-image: linear-gradient(#e7e7df, #f0f0f0);
box-shadow: inset 0 1px 3px hsla(0, 0%, 0%, 0.16);
}
.progress__bar {
border: 1px #07629a solid;
background: #057ec9;
background-image:
-webkit-linear-gradient( top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15) ),
-webkit-linear-gradient( left top,
#0094f0 0%,
#0094f0 25%,
#007ecc 25%,
#007ecc 50%,
#0094f0 50%,
#0094f0 75%,
#0094f0 100% );
background-image:
-webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)), -webkit-linear-gradient(left top, #0094f0 0%, #0094f0 25%, #007ecc 25%, #007ecc 50%, #0094f0 50%, #0094f0 75%, #0094f0 100%);
background-image:
linear-gradient( to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15) ),
linear-gradient( to right bottom,
#0094f0 0%,
#0094f0 25%,
#007ecc 25%,
#007ecc 50%,
#0094f0 50%,
#0094f0 75%,
#0094f0 100% );
background-size: 40px 40px;
margin-top: -1px;
margin-left: -1px;
padding: 0 1px;
width: 3%;
height: 16px;
border-radius: 10em;
-webkit-animation: animate-stripes 3s linear infinite;
-moz-animation: animate-stripes 3s linear infinite;
-webkit-transition: width 0.5s ease-out;
transition: width 0.5s ease-out;
}
/**
* Progress bar animations.
*/
@-webkit-keyframes animate-stripes {
0% {background-position: 0 0, 0 0;} 100% {background-position: 0 0, -80px 0;}
}
@-ms-keyframes animate-stripes {
0% {background-position: 0 0, 0 0;} 100% {background-position: 0 0, -80px 0;}
}
@keyframes animate-stripes {
0% {background-position: 0 0, 0 0;} 100% {background-position: 0 0, -80px 0;}
}
/**
* Markup generated by menu.html.twig.
*/
ul.menu {
list-style: none outside;
margin-left: 1em; /* LTR */
padding: 0;
text-align: left; /* LTR */
}
[dir="rtl"] ul.menu {
margin-left: 0;
margin-right: 1em;
text-align: right;
}
.menu-item--expanded {
list-style-image: url(../../../misc/menu-expanded.png);
list-style-type: circle;
}
.menu-item--collapsed {
list-style-image: url(../../../misc/menu-collapsed.png); /* LTR */
list-style-type: disc;
}
[dir="rtl"] .menu-item--collapsed {
list-style-image: url(../../../misc/menu-collapsed-rtl.png);
}
.menu-item {
padding-top: 0.2em;
margin: 0;
}
ul.menu a.is-active {
color: #000;
}
/**
* Markup generated by links.html.twig.
*/
ul.inline,
ul.links.inline {
display: inline;
padding-left: 0;
}
ul.inline li {
display: inline;
list-style-type: none;
padding: 0 0.5em;
}
ul.links a.is-active {
color: #000;
}
/**
* Markup generated by breadcrumb.html.twig.
*/
.breadcrumb {
padding-bottom: 0.5em;
}
.breadcrumb ol {
margin: 0;
padding: 0;
}
[dir="rtl"] .breadcrumb ol {
/* This is required to win over specifity of [dir="rtl"] ol */
margin-right: 0;
}
.breadcrumb li {
display: inline;
list-style-type: none;
margin: 0;
padding: 0;
}
/* IE8 does not support :not() and :last-child. */
.breadcrumb li:before {
content: ' \BB ';
}
.breadcrumb li:first-child:before {
content: none;
}
/**
* Markup generated by menu-local-tasks.html.twig.
*/
div.tabs {
margin: 1em 0;
}
ul.tabs {
list-style: none;
margin: 0 0 0.5em;
padding: 0;
}
.tabs > li {
display: inline-block;
margin-right: 0.3em; /* LTR */
}
[dir="rtl"] .tabs > li {
margin-left: 0.3em;
margin-right: 0;
}
.tabs a {
display: block;
padding: 0.2em 1em;
text-decoration: none;
}
.tabs a.is-active {
background-color: #eee;
}
.tabs a:focus,
.tabs a:hover {
background-color: #f5f5f5;
}
/**
* Styles for link buttons and action links.
*/
.action-links {
list-style: none;
padding: 0;
margin: 1em 0;
}
[dir="rtl"] .action-links {
/* This is required to win over specifity of [dir="rtl"] ul */
margin-right: 0;
}
.action-links li {
display: inline-block;
margin: 0 0.3em;
}
.action-links li:first-child {
margin-left: 0; /* LTR */
}
[dir="rtl"] .action-links li:first-child {
margin-left: 0.3em;
margin-right: 0;
}
.button-action {
display: inline-block;
line-height: 160%;
padding: 0.2em 0.5em 0.3em;
text-decoration: none;
}
.button-action:before {
content: '+';
font-weight: 900;
margin-left: -0.1em; /* LTR */
padding-right: 0.2em; /* LTR */
}
[dir="rtl"] .button-action:before {
margin-left: 0;
margin-right: -0.1em;
padding-left: 0.2em;
padding-right: 0;
}
/**
* Styles for system messages.
*/
.messages {
background: no-repeat 10px 17px; /* LTR */
border: 1px solid;
border-width: 1px 1px 1px 0; /* LTR */
border-radius: 2px;
padding: 15px 20px 15px 35px; /* LTR */
word-wrap: break-word;
overflow-wrap: break-word;
}
[dir="rtl"] .messages {
border-width: 1px 0 1px 1px;
background-position: right 10px top 17px;
padding-left: 20px;
padding-right: 35px;
text-align: right;
}
.messages + .messages {
margin-top: 1.538em;
}
.messages__list {
list-style: none;
padding: 0;
margin: 0;
}
.messages__item + .messages__item {
margin-top: 0.769em;
}
/* See .color-success in Seven's colors.css */
.messages--status {
color: #325e1c;
background-color: #f3faef;
border-color: #c9e1bd #c9e1bd #c9e1bd transparent; /* LTR */
background-image: url(../../../misc/icons/73b355/check.svg);
box-shadow: -8px 0 0 #77b259; /* LTR */
}
[dir="rtl"] .messages--status {
border-color: #c9e1bd transparent #c9e1bd #c9e1bd;
box-shadow: 8px 0 0 #77b259;
margin-left: 0;
}
/* See .color-warning in Seven's colors.css */
.messages--warning {
background-color: #fdf8ed;
background-image: url(../../../misc/icons/e29700/warning.svg);
border-color: #f4daa6 #f4daa6 #f4daa6 transparent; /* LTR */
color: #734c00;
box-shadow: -8px 0 0 #e09600; /* LTR */
}
[dir="rtl"] .messages--warning {
border-color: #f4daa6 transparent #f4daa6 #f4daa6;
box-shadow: 8px 0 0 #e09600;
}
/* See .color-error in Seven's colors.css */
.messages--error {
background-color: #fcf4f2;
color: #a51b00;
background-image: url(../../../misc/icons/ea2800/error.svg);
border-color: #f9c9bf #f9c9bf #f9c9bf transparent; /* LTR */
box-shadow: -8px 0 0 #e62600; /* LTR */
}
[dir="rtl"] .messages--error {
border-color: #f9c9bf transparent #f9c9bf #f9c9bf;
box-shadow: 8px 0 0 #e62600;
}
.messages--error p.error {
color: #a51b00;
}
/* Field display */
.field .field-label {
font-weight: bold;
}
.field-label-inline .field-label,
.field-label-inline .field-items {
float:left; /*LTR*/
margin-right: 0.5em; /*LTR*/
}
[dir="rtl"] .field-label-inline .field-label,
[dir="rtl"] .field-label-inline .field-items {
float: right;
margin-left: 0.5em;
margin-right: 0;
}
.field-label-inline .field-label::after {
content: ':';
}
/* Form display */
form .field-multiple-table {
margin: 0;
}
form .field-multiple-table .field-multiple-drag {
width: 30px;
padding-right: 0; /*LTR*/
}
[dir="rtl"] form .field-multiple-table .field-multiple-drag {
padding-left: 0;
}
form .field-multiple-table .field-multiple-drag .tabledrag-handle {
padding-right: .5em; /*LTR*/
}
[dir="rtl"] form .field-multiple-table .field-multiple-drag .tabledrag-handle {
padding-left: .5em;
}
form .field-add-more-submit {
margin: .5em 0 0;
}

View file

@ -1,12 +0,0 @@
id: d6_menu
label: Drupal 6 menus
migration_tags:
- Drupal 6
source:
plugin: d6_menu
process:
id: menu_name
label: title
description: description
destination:
plugin: entity:menu

View file

@ -1,122 +0,0 @@
<?php
/**
* @file
* Contains \Drupal\system\FileAjaxForm.
*/
namespace Drupal\system;
use Drupal\Core\Form\FormStateInterface;
/**
* Wrapper for Ajax forms data and commands, avoiding a multi-return-value tuple.
*
* @ingroup ajax
*/
class FileAjaxForm {
/**
* The form to cache.
*
* @var array
*/
protected $form;
/**
* The form state.
*
* @var \Drupal\Core\Form\FormStateInterface
*/
protected $formState;
/**
* The unique form ID.
*
* @var string
*/
protected $formId;
/**
* The unique form build ID.
*
* @var string
*/
protected $formBuildId;
/**
* The array of ajax commands.
*
* @var \Drupal\Core\Ajax\CommandInterface[]
*/
protected $commands;
/**
* Constructs a FileAjaxForm object.
*
* @param array $form
* The form definition.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The form state.
* @param \Drupal\Core\Ajax\string|string $form_id
* The unique form ID.
* @param \Drupal\Core\Ajax\string|string $form_build_id
* The unique form build ID.
* @param \Drupal\Core\Ajax\CommandInterface[] $commands
* The ajax commands.
*/
public function __construct(array $form, FormStateInterface $form_state, $form_id, $form_build_id, array $commands) {
$this->form = $form;
$this->formState = $form_state;
$this->formId = $form_id;
$this->formBuildId = $form_build_id;
$this->commands = $commands;
}
/**
* Gets all AJAX commands.
*
* @return \Drupal\Core\Ajax\CommandInterface[]
* Returns all previously added AJAX commands.
*/
public function getCommands() {
return $this->commands;
}
/**
* Gets the form definition.
*
* @return array
*/
public function getForm() {
return $this->form;
}
/**
* Gets the unique form build ID.
*
* @return string
*/
public function getFormBuildId() {
return $this->formBuildId;
}
/**
* Gets the unique form ID.
*
* @return string
*/
public function getFormId() {
return $this->formId;
}
/**
* Gets the form state.
*
* @return \Drupal\Core\Form\FormStateInterface
*/
public function getFormState() {
return $this->formState;
}
}

View file

@ -1,87 +0,0 @@
<?php
/**
* @file
* Contains \Drupal\system\Tests\Extension\InfoParserUnitTest.
*/
namespace Drupal\system\Tests\Extension;
use Drupal\simpletest\KernelTestBase;
use Drupal\Core\Extension\InfoParser;
use Drupal\Core\Extension\InfoParserException;
/**
* Tests InfoParser class and exception.
*
* Files for this test are stored in core/modules/system/tests/fixtures and end
* with .info.txt instead of info.yml in order not not be considered as real
* extensions.
*
* @group Extension
*/
class InfoParserUnitTest extends KernelTestBase {
/**
* The InfoParser object.
*
* @var \Drupal\Core\Extension\InfoParser
*/
protected $infoParser;
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->infoParser = new InfoParser();
}
/**
* Tests the functionality of the infoParser object.
*/
public function testInfoParser() {
$info = $this->infoParser->parse('core/modules/system/tests/fixtures/does_not_exist.info.txt');
$this->assertTrue(empty($info), 'Non existing info.yml returns empty array.');
// Test that invalid YAML throws an exception and that message contains the
// filename that caused it.
$filename = 'core/modules/system/tests/fixtures/broken.info.txt';
try {
$this->infoParser->parse($filename);
$this->fail('Expected InfoParserException not thrown when reading broken.info.txt');
}
catch (InfoParserException $e) {
$this->assertTrue(strpos($e->getMessage(), $filename) !== FALSE, 'Exception message contains info.yml filename.');
}
// Tests that missing required keys are detected.
$filename = 'core/modules/system/tests/fixtures/missing_keys.info.txt';
try {
$this->infoParser->parse($filename);
$this->fail('Expected InfoParserException not thrown when reading missing_keys.info.txt');
}
catch (InfoParserException $e) {
$expected_message = "Missing required keys (type, core, name) in $filename.";
$this->assertEqual($e->getMessage(), $expected_message);
}
// Tests that a single missing required key is detected.
$filename = 'core/modules/system/tests/fixtures/missing_key.info.txt';
try {
$this->infoParser->parse($filename);
$this->fail('Expected InfoParserException not thrown when reading missing_key.info.txt');
}
catch (InfoParserException $e) {
$expected_message = "Missing required keys (type) in $filename.";
$this->assertEqual($e->getMessage(), $expected_message);
}
$info_values = $this->infoParser->parse('core/modules/system/tests/fixtures/common_test.info.txt');
$this->assertEqual($info_values['simple_string'], 'A simple string', 'Simple string value was parsed correctly.', 'System');
$this->assertEqual($info_values['version'], \Drupal::VERSION, 'Constant value was parsed correctly.', 'System');
$this->assertEqual($info_values['double_colon'], 'dummyClassName::', 'Value containing double-colon was parsed correctly.', 'System');
}
}

View file

@ -1,343 +0,0 @@
<?php
/**
* @file
* Contains \Drupal\system\Tests\Extension\ModuleHandlerTest.
*/
namespace Drupal\system\Tests\Extension;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\simpletest\KernelTestBase;
use \Drupal\Core\Extension\ModuleUninstallValidatorException;
/**
* Tests ModuleHandler functionality.
*
* @group Extension
*/
class ModuleHandlerTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
public static $modules = array('system');
public function setUp() {
parent::setUp();
// Set up the state values so we know where to find the files when running
// drupal_get_filename().
// @todo Remove as part of https://www.drupal.org/node/2186491
system_rebuild_module_data();
}
/**
* {@inheritdoc}
*/
public function containerBuild(ContainerBuilder $container) {
parent::containerBuild($container);
// Put a fake route bumper on the container to be called during uninstall.
$container
->register('router.dumper', 'Drupal\Core\Routing\NullMatcherDumper');
}
/**
* The basic functionality of retrieving enabled modules.
*/
function testModuleList() {
// Prime the drupal_get_filename() static cache with the location of the
// testing profile as it is not the currently active profile and we don't
// yet have any cached way to retrieve its location.
// @todo Remove as part of https://www.drupal.org/node/2186491
drupal_get_filename('profile', 'testing', 'core/profiles/testing/testing.info.yml');
// Build a list of modules, sorted alphabetically.
$profile_info = install_profile_info('testing', 'en');
$module_list = $profile_info['dependencies'];
// Installation profile is a module that is expected to be loaded.
$module_list[] = 'testing';
sort($module_list);
// Compare this list to the one returned by the module handler. We expect
// them to match, since all default profile modules have a weight equal to 0
// (except for block.module, which has a lower weight but comes first in
// the alphabet anyway).
$this->assertModuleList($module_list, 'Testing profile');
// Try to install a new module.
$this->moduleInstaller()->install(array('ban'));
$module_list[] = 'ban';
sort($module_list);
$this->assertModuleList($module_list, 'After adding a module');
// Try to mess with the module weights.
module_set_weight('ban', 20);
// Move ban to the end of the array.
unset($module_list[array_search('ban', $module_list)]);
$module_list[] = 'ban';
$this->assertModuleList($module_list, 'After changing weights');
// Test the fixed list feature.
$fixed_list = array(
'system' => 'core/modules/system/system.module',
'menu' => 'core/modules/menu/menu.module',
);
$this->moduleHandler()->setModuleList($fixed_list);
$new_module_list = array_combine(array_keys($fixed_list), array_keys($fixed_list));
$this->assertModuleList($new_module_list, t('When using a fixed list'));
}
/**
* Assert that the extension handler returns the expected values.
*
* @param array $expected_values
* The expected values, sorted by weight and module name.
* @param $condition
*/
protected function assertModuleList(Array $expected_values, $condition) {
$expected_values = array_values(array_unique($expected_values));
$enabled_modules = array_keys($this->container->get('module_handler')->getModuleList());
$enabled_modules = sort($enabled_modules);
$this->assertEqual($expected_values, $enabled_modules, format_string('@condition: extension handler returns correct results', array('@condition' => $condition)));
}
/**
* Tests dependency resolution.
*
* Intentionally using fake dependencies added via hook_system_info_alter()
* for modules that normally do not have any dependencies.
*
* To simplify things further, all of the manipulated modules are either
* purely UI-facing or live at the "bottom" of all dependency chains.
*
* @see module_test_system_info_alter()
* @see https://www.drupal.org/files/issues/dep.gv__0.png
*/
function testDependencyResolution() {
$this->enableModules(array('module_test'));
$this->assertTrue($this->moduleHandler()->moduleExists('module_test'), 'Test module is enabled.');
// Ensure that modules are not enabled.
$this->assertFalse($this->moduleHandler()->moduleExists('color'), 'Color module is disabled.');
$this->assertFalse($this->moduleHandler()->moduleExists('config'), 'Config module is disabled.');
$this->assertFalse($this->moduleHandler()->moduleExists('help'), 'Help module is disabled.');
// Create a missing fake dependency.
// Color will depend on Config, which depends on a non-existing module Foo.
// Nothing should be installed.
\Drupal::state()->set('module_test.dependency', 'missing dependency');
drupal_static_reset('system_rebuild_module_data');
try {
$result = $this->moduleInstaller()->install(array('color'));
$this->fail(t('ModuleInstaller::install() throws an exception if dependencies are missing.'));
}
catch (\Drupal\Core\Extension\MissingDependencyException $e) {
$this->pass(t('ModuleInstaller::install() throws an exception if dependencies are missing.'));
}
$this->assertFalse($this->moduleHandler()->moduleExists('color'), 'ModuleHandler::install() aborts if dependencies are missing.');
// Fix the missing dependency.
// Color module depends on Config. Config depends on Help module.
\Drupal::state()->set('module_test.dependency', 'dependency');
drupal_static_reset('system_rebuild_module_data');
$result = $this->moduleInstaller()->install(array('color'));
$this->assertTrue($result, 'ModuleHandler::install() returns the correct value.');
// Verify that the fake dependency chain was installed.
$this->assertTrue($this->moduleHandler()->moduleExists('config') && $this->moduleHandler()->moduleExists('help'), 'Dependency chain was installed.');
// Verify that the original module was installed.
$this->assertTrue($this->moduleHandler()->moduleExists('color'), 'Module installation with dependencies succeeded.');
// Verify that the modules were enabled in the correct order.
$module_order = \Drupal::state()->get('module_test.install_order') ?: array();
$this->assertEqual($module_order, array('help', 'config', 'color'));
// Uninstall all three modules explicitly, but in the incorrect order,
// and make sure that ModuleHandler::uninstall() uninstalled them in the
// correct sequence.
$result = $this->moduleInstaller()->uninstall(array('config', 'help', 'color'));
$this->assertTrue($result, 'ModuleHandler::uninstall() returned TRUE.');
foreach (array('color', 'config', 'help') as $module) {
$this->assertEqual(drupal_get_installed_schema_version($module), SCHEMA_UNINSTALLED, "$module module was uninstalled.");
}
$uninstalled_modules = \Drupal::state()->get('module_test.uninstall_order') ?: array();
$this->assertEqual($uninstalled_modules, array('color', 'config', 'help'), 'Modules were uninstalled in the correct order.');
// Enable Color module again, which should enable both the Config module and
// Help module. But, this time do it with Config module declaring a
// dependency on a specific version of Help module in its info file. Make
// sure that Drupal\Core\Extension\ModuleHandler::install() still works.
\Drupal::state()->set('module_test.dependency', 'version dependency');
drupal_static_reset('system_rebuild_module_data');
$result = $this->moduleInstaller()->install(array('color'));
$this->assertTrue($result, 'ModuleHandler::install() returns the correct value.');
// Verify that the fake dependency chain was installed.
$this->assertTrue($this->moduleHandler()->moduleExists('config') && $this->moduleHandler()->moduleExists('help'), 'Dependency chain was installed.');
// Verify that the original module was installed.
$this->assertTrue($this->moduleHandler()->moduleExists('color'), 'Module installation with version dependencies succeeded.');
// Finally, verify that the modules were enabled in the correct order.
$enable_order = \Drupal::state()->get('module_test.install_order') ?: array();
$this->assertIdentical($enable_order, array('help', 'config', 'color'));
}
/**
* Tests uninstalling a module that is a "dependency" of a profile.
*/
function testUninstallProfileDependency() {
$profile = 'minimal';
$dependency = 'dblog';
$this->settingsSet('install_profile', $profile);
// Prime the drupal_get_filename() static cache with the location of the
// minimal profile as it is not the currently active profile and we don't
// yet have any cached way to retrieve its location.
// @todo Remove as part of https://www.drupal.org/node/2186491
drupal_get_filename('profile', $profile, 'core/profiles/' . $profile . '/' . $profile . '.info.yml');
$this->enableModules(array('module_test', $profile));
drupal_static_reset('system_rebuild_module_data');
$data = system_rebuild_module_data();
$this->assertTrue(isset($data[$profile]->requires[$dependency]));
$this->moduleInstaller()->install(array($dependency));
$this->assertTrue($this->moduleHandler()->moduleExists($dependency));
// Uninstall the profile module "dependency".
$result = $this->moduleInstaller()->uninstall(array($dependency));
$this->assertTrue($result, 'ModuleHandler::uninstall() returns TRUE.');
$this->assertFalse($this->moduleHandler()->moduleExists($dependency));
$this->assertEqual(drupal_get_installed_schema_version($dependency), SCHEMA_UNINSTALLED, "$dependency module was uninstalled.");
// Verify that the installation profile itself was not uninstalled.
$uninstalled_modules = \Drupal::state()->get('module_test.uninstall_order') ?: array();
$this->assertTrue(in_array($dependency, $uninstalled_modules), "$dependency module is in the list of uninstalled modules.");
$this->assertFalse(in_array($profile, $uninstalled_modules), 'The installation profile is not in the list of uninstalled modules.');
}
/**
* Tests uninstalling a module that has content.
*/
function testUninstallContentDependency() {
$this->enableModules(array('module_test', 'entity_test', 'text', 'user', 'help'));
$this->assertTrue($this->moduleHandler()->moduleExists('entity_test'), 'Test module is enabled.');
$this->assertTrue($this->moduleHandler()->moduleExists('module_test'), 'Test module is enabled.');
$this->installSchema('user', 'users_data');
$entity_types = \Drupal::entityManager()->getDefinitions();
foreach ($entity_types as $entity_type) {
if ('entity_test' == $entity_type->getProvider()) {
$this->installEntitySchema($entity_type->id());
}
}
// Create a fake dependency.
// entity_test will depend on help. This way help can not be uninstalled
// when there is test content preventing entity_test from being uninstalled.
\Drupal::state()->set('module_test.dependency', 'dependency');
drupal_static_reset('system_rebuild_module_data');
// Create an entity so that the modules can not be disabled.
$entity = entity_create('entity_test', array('name' => $this->randomString()));
$entity->save();
// Uninstalling entity_test is not possible when there is content.
try {
$message = 'ModuleHandler::uninstall() throws ModuleUninstallValidatorException upon uninstalling a module which does not pass validation.';
$this->moduleInstaller()->uninstall(array('entity_test'));
$this->fail($message);
}
catch (ModuleUninstallValidatorException $e) {
$this->pass(get_class($e) . ': ' . $e->getMessage());
}
// Uninstalling help needs entity_test to be un-installable.
try {
$message = 'ModuleHandler::uninstall() throws ModuleUninstallValidatorException upon uninstalling a module which does not pass validation.';
$this->moduleInstaller()->uninstall(array('help'));
$this->fail($message);
}
catch (ModuleUninstallValidatorException $e) {
$this->pass(get_class($e) . ': ' . $e->getMessage());
}
// Deleting the entity.
$entity->delete();
$result = $this->moduleInstaller()->uninstall(array('help'));
$this->assertTrue($result, 'ModuleHandler::uninstall() returns TRUE.');
$this->assertEqual(drupal_get_installed_schema_version('entity_test'), SCHEMA_UNINSTALLED, "entity_test module was uninstalled.");
}
/**
* Tests whether the correct module metadata is returned.
*/
function testModuleMetaData() {
// Generate the list of available modules.
$modules = system_rebuild_module_data();
// Check that the mtime field exists for the system module.
$this->assertTrue(!empty($modules['system']->info['mtime']), 'The system.info.yml file modification time field is present.');
// Use 0 if mtime isn't present, to avoid an array index notice.
$test_mtime = !empty($modules['system']->info['mtime']) ? $modules['system']->info['mtime'] : 0;
// Ensure the mtime field contains a number that is greater than zero.
$this->assertTrue(is_numeric($test_mtime) && ($test_mtime > 0), 'The system.info.yml file modification time field contains a timestamp.');
}
/**
* Tests whether module-provided stream wrappers are registered properly.
*/
public function testModuleStreamWrappers() {
// file_test.module provides (among others) a 'dummy' stream wrapper.
// Verify that it is not registered yet to prevent false positives.
$stream_wrappers = \Drupal::service('stream_wrapper_manager')->getWrappers();
$this->assertFalse(isset($stream_wrappers['dummy']));
$this->moduleInstaller()->install(['file_test']);
// Verify that the stream wrapper is available even without calling
// \Drupal::service('stream_wrapper_manager')->getWrappers() again.
// If the stream wrapper is not available file_exists() will raise a notice.
file_exists('dummy://');
$stream_wrappers = \Drupal::service('stream_wrapper_manager')->getWrappers();
$this->assertTrue(isset($stream_wrappers['dummy']));
}
/**
* Tests whether the correct theme metadata is returned.
*/
function testThemeMetaData() {
// Generate the list of available themes.
$themes = \Drupal::service('theme_handler')->rebuildThemeData();
// Check that the mtime field exists for the bartik theme.
$this->assertTrue(!empty($themes['bartik']->info['mtime']), 'The bartik.info.yml file modification time field is present.');
// Use 0 if mtime isn't present, to avoid an array index notice.
$test_mtime = !empty($themes['bartik']->info['mtime']) ? $themes['bartik']->info['mtime'] : 0;
// Ensure the mtime field contains a number that is greater than zero.
$this->assertTrue(is_numeric($test_mtime) && ($test_mtime > 0), 'The bartik.info.yml file modification time field contains a timestamp.');
}
/**
* Returns the ModuleHandler.
*
* @return \Drupal\Core\Extension\ModuleHandlerInterface
*/
protected function moduleHandler() {
return $this->container->get('module_handler');
}
/**
* Returns the ModuleInstaller.
*
* @return \Drupal\Core\Extension\ModuleInstallerInterface
*/
protected function moduleInstaller() {
return $this->container->get('module_installer');
}
}

View file

@ -1,59 +0,0 @@
<?php
/**
* @file
* Contains \Drupal\system\Tests\Migrate\d6\MigrateMenuTest.
*/
namespace Drupal\system\Tests\Migrate\d6;
use Drupal\migrate\MigrateExecutable;
use Drupal\Core\Database\Database;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
use Drupal\system\Entity\Menu;
/**
* Upgrade menus to system.menu.*.yml.
*
* @group system
*/
class MigrateMenuTest extends MigrateDrupal6TestBase {
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->loadDumps(['MenuCustom.php']);
$this->executeMigration('d6_menu');
}
/**
* Tests the Drupal 6 menu to Drupal 8 migration.
*/
public function testMenu() {
$navigation_menu = Menu::load('navigation');
$this->assertIdentical('navigation', $navigation_menu->id());
$this->assertIdentical('Navigation', $navigation_menu->label());
$expected = <<<EOT
The navigation menu is provided by Drupal and is the main interactive menu for any site. It is usually the only menu that contains personalized links for authenticated users, and is often not even visible to anonymous users.
EOT;
$this->assertIdentical($expected, $navigation_menu->getDescription());
// Test that we can re-import using the ConfigEntityBase destination.
Database::getConnection('default', 'migrate')
->update('menu_custom')
->fields(array('title' => 'Home Navigation'))
->condition('menu_name', 'navigation')
->execute();
db_truncate(entity_load('migration', 'd6_menu')->getIdMap()->mapTableName())->execute();
$migration = entity_load_unchanged('migration', 'd6_menu');
$executable = new MigrateExecutable($migration, $this);
$executable->import();
$navigation_menu = entity_load_unchanged('menu', 'navigation');
$this->assertIdentical('Home Navigation', $navigation_menu->label());
}
}

View file

@ -1,9 +0,0 @@
# info.yml for testing broken YAML parsing exception handling.
name: File
type: module
description: 'Defines a file field type.'
package: Core
version: VERSION
core: 8.x
dependencies::;;
- field

View file

@ -1,7 +0,0 @@
core: 8.x
name: common_test
type: module
description: 'testing info file parsing'
simple_string: 'A simple string'
version: "VERSION"
double_colon: dummyClassName::

View file

@ -1,8 +0,0 @@
# info.yml for testing missing type key.
name: File
description: 'Defines a file field type.'
package: Core
version: VERSION
core: 8.x
dependencies:
- field

View file

@ -1,5 +0,0 @@
# info.yml for testing missing name, description, and type keys.
package: Core
version: VERSION
dependencies:
- field