Skip to content

Instantly share code, notes, and snippets.

<?php
namespace Drupal\dc_search\Plugin\views\display;
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\Plugin\views\display\Attachment;
use Drupal\views\ViewExecutable;
/**
* The plugin that handles a single-page attachment display.
@stborchert
stborchert / visu_config.xsd
Created January 19, 2019 10:46
Part of visu_config.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:group name="AvailablePlugins">
<xsd:choice>
<xsd:element name="openweathermap" type="openweathermap" />
</xsd:choice>
</xsd:group>
<!-- Custom widgets -->
@stborchert
stborchert / visu_config.xml
Last active January 19, 2019 11:57
Part of visu_config.xml
<?xml version="1.0" encoding="UTF-8"?>
<pages backend="oh" bind_click_to_widget="false" design="minimal" enable_column_adjustment="true" lib_version="7" scroll_speed="0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../visu_config.xsd">
<meta>
<plugins>
<!-- Custom plugin to display data from OpenWeatherMap. -->
<plugin name="openweathermap"/>
</plugins>
</meta>
<page name="Allgemein" showfooter="false" shownavbar-left="false" showtopnavigation="false">
<navbar position="top">
@stborchert
stborchert / jowm.css
Created January 19, 2019 10:59
Styles for openweathermap
/**
* Custom styles for openweathermap widget.
*/
.jowm {
font-family: 'Gotham SSm A', 'Gotham SSm B';
padding: .5rem 1rem;
}
.jowm .weather-icon {
color: #ffffff;
display: block;
<?php
namespace Drupal\up_migrate\Plugin\migrate\source;
use ArrayObject;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\migrate\Plugin\migrate\source\SourcePluginBase;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\paragraphs\Entity\ParagraphsType;
id: paragraphtypes_form_display__status
label: Add status field to paragraph form display.
source:
plugin: up_paragraphs_type
exclude:
- text
constants:
entity_type: paragraph
field_name: status
form_mode: default
id: paragraphtypes_field_paragraphs_comment
label: Adds field_paragraphs_comment to paragraph types.
source:
plugin: up_paragraphs_type
exclude:
- text
constants:
entity_type: paragraph
field_name: field_paragraphs_comment
translatable: true
id: paragraphtypes_field_storage_paragraphs_comment
label: Define field storage for field_paragraphs_comment.
source:
plugin: empty
constants:
entity_type: paragraph
id: paragraph.field_paragraphs_comment
field_name: field_paragraphs_comment
type: string
cardinality: 1
@stborchert
stborchert / docker-compose.solr.yaml
Created December 15, 2020 08:05
DDEV recipe for Solr 4
# DDev Apache Solr recipe file for Solr 4.
#
# To access Solr after it is installed:
# - The Solr admin interface will be accessible at:
# http://<projectname>.ddev.site:8983/solr/
# For example, if the project is named "myproject" the hostname will be:
# http://myproject.ddev.site:8983/solr/
# - To access the Solr container from the web container use:
# http://solr:8983/solr/
@stborchert
stborchert / core.properties
Created December 17, 2020 12:38
Solr 4 core properties file
name=default
config=solrconfig.xml
schema=schema.xml
dataDir=data