Skip to content

Instantly share code, notes, and snippets.

@dawehner
dawehner / -
Created September 9, 2016 19:05
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityEventsTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityEventsTest.php
new file mode 100644
index 0000000..012b323
--- /dev/null
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityEventsTest.php
@@ -0,0 +1,51 @@
+<?php
+
+namespace Drupal\KernelTests\Core\Entity;
+
@dawehner
dawehner / php
Last active September 9, 2016 16:45
<?php
class MYPlugin {
public function __construct(Config $a, Config $b);
}
$parameters = ['a' => $config_b, 'b' => $config_a];
->getMyPlugin($parameters)
@dawehner
dawehner / -
Created September 7, 2016 09:38
diff --git a/docroot/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php b/docroot/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php
index 869abe3..d17e0f3 100644
--- a/docroot/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php
+++ b/docroot/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php
@@ -80,7 +80,10 @@ class CssCollectionRenderer implements AssetCollectionRendererInterface {
// browser-caching. The string changes on every update or full cache
// flush, forcing browsers to load a new copy of the files, as the
// URL changed.
- $query_string = $this->state->get('system.css_js_query_string') ?: '0';
+ if (($query_string = $this->state->get('system.css_js_query_string', NULL)) && $query_string === NULL) {
@dawehner
dawehner / -
Created September 6, 2016 11:00
diff --git a/core/modules/comment/src/CommentViewsData.php b/core/modules/comment/src/CommentViewsData.php
index 2d9b021..4fde17b 100644
--- a/core/modules/comment/src/CommentViewsData.php
+++ b/core/modules/comment/src/CommentViewsData.php
@@ -146,10 +146,10 @@ public function getViewsData() {
),
);
- $data['comment_field_data']['status']['title'] = $this->t('Approved status');
- $data['comment_field_data']['status']['help'] = $this->t('Whether the comment is approved (or still in the moderation queue).');
>>> \Drupal::keyValue('entity.definitions.installed')->get('node.field_storage_definitions')['field_slices2']
=> Drupal\field\Entity\FieldStorageConfig {#12395
+custom_storage: false,
+"cardinality_number": 1,
+"submit": Drupal\Core\StringTranslation\TranslatableMarkup {#12396},
+"form_build_id": "form-bflbT1B-iPfbyR1DzUT4j-57q52NDBw-HH16ZdiuSiQ",
+"form_token": "o-Fc2GPRAsnfstmkY0-S3a9Yi1RC0wtlPTeLEZ7FSPY",
+"form_id": "field_storage_config_edit_form",
#uuid: "194029e7-739f-4877-8e6c-d5df000c8f67",
{
"name": "nightmare-parallel",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js",
"serve": "caddy www -p 8000 -c-1"
},
"author": "Matthew Grill",
diff --git a/modules/edition_filter/src/Form/EditionFilterForm.php b/modules/edition_filter/src/Form/EditionFilterForm.php
index dd1a5f8..473dc00 100644
--- a/modules/edition_filter/src/Form/EditionFilterForm.php
+++ b/modules/edition_filter/src/Form/EditionFilterForm.php
@@ -92,9 +92,13 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
*/
protected function getEditionLabels(UserInterface $user, $field) {
$editions = [];
+ /** @var \Drupal\Core\Entity\EntityRepositoryInterface $entity_repo */
+ $entity_repo = \Drupal::service('entity_type.repository');
--- a/core/modules/views/config/schema/views.filter.schema.yml
+++ b/core/modules/views/config/schema/views.filter.schema.yml
@@ -123,7 +123,7 @@ views.filter.group_item.numeric:
# Schema for the views filter value.
views.filter_value.boolean:
- type: boolean
+ type: string
The website encountered an unexpected error. Please try again later.
InvalidArgumentException: The inline_entity_form element requires the #entity_type property. in Drupal\inline_entity_form\Element\InlineEntityForm::processEntityForm() (line 88 of modules/contrib/inline_entity_form/src/Element/InlineEntityForm.php).
call_user_func_array(Array, Array) (Line: 979)
Drupal\Core\Form\FormBuilder->doBuildForm('node_article_edit_form', Array, Object) (Line: 1042)
Drupal\Core\Form\FormBuilder->doBuildForm('node_article_edit_form', Array, Object) (Line: 1042)
Drupal\Core\Form\FormBuilder->doBuildForm('node_article_edit_form', Array, Object) (Line: 1042)
Drupal\Core\Form\FormBuilder->doBuildForm('node_article_edit_form', Array, Object) (Line: 1042)
Drupal\Core\Form\FormBuilder->doBuildForm('node_article_edit_form', Array, Object) (Line: 555)
Drupal\Core\Form\FormBuilder->processForm('node_article_edit_form', Array, Object) (Line: 314)
type Bool = False | True
a = False
main = case a of
False -> "123"
Tuer -> "124"