Skip to content

Instantly share code, notes, and snippets.

View heddn's full-sized avatar

Lucas Hedding heddn

View GitHub Profile
/** @var \Drupal\bootstrap\Utility\Element $element */
$element = Element::create($variables['element']);
$sanitizedViewMode = strtr($element->getProperty('view_mode'), '.', '_');
$entityType = $element->getProperty('entity_type');
$fieldName = $element->getProperty('field_name');
$bundle = $element->getProperty('bundle');
$suggestions[] = 'field__' . $entityType . '__' . $fieldName . '__' . $bundle . '__' . $sanitizedViewMode;
$ composer require drupal/menu_admin_per_menu
Using version 1.x-dev for drupal/menu_admin_per_menu
./composer.json has been updated
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package menu_admin_per_menu could not be found in any version, there may be a typo in the package name.
$ composer require -a drupal/menu_admin_per_menu --prefer-dist -o
Using version 1.x-dev for drupal/menu_admin_per_menu
./composer.json has been updated
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package menu_admin_per_menu could not be found in any version, there may be a typo in the package name.
<?php
namespace Drupal\Tests\file\Kernel\Migrate\d6;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\file\Plugin\migrate\process\d6\CckFile;
use Drupal\migrate\Plugin\migrate\process\Migration;
use Drupal\migrate\Plugin\MigratePluginManager;
use Drupal\migrate\Plugin\MigrationInterface;
source:
plugin: url
data_fetcher_plugin: http
data_parser_plugin: json
urls: http://localhost/sites/default/files/json-files/foo.json
item_selector: 'xpath/selector/here'
fields:
-
name: machine_name
label: 'Unique position identifier'
<?php
namespace Drupal\paragraphs\Plugin\migrate\destination;
use Drupal\migrate\Plugin\migrate\destination\EntityContentBase;
use Drupal\Core\Entity\ContentEntityInterface;
/**
* @MigrateDestination(
* id = "entity:paragraph"
field_kilde_paragraphs:
plugin: iterator
source: kilde
process:
id:
-
plugin: migration
source:
- bibliotek_dk_url
- linktekst
field_image:
plugin: d6_cck_file
source: field_image
migration:
- custom_file_migration
# This file describes an application. You can have multiple applications
# in the same project.
# The name of this app. Must be unique within a project.
name: app
# The runtime the application uses.
type: 'php:7.0'
# Configuration of the build of this application.
Extra small devices (phones, less than 768px)
No media query since this is the default in Bootstrap.
Small devices (tablets, 768px and up)
@media (min-width: @screen-sm-min) { }
Medium devices (desktops, 992px and up)
@media (min-width: @screen-md-min) { }
Large devices (large desktops, 1200px and up)
@media (min-width: @screen-lg-min) { }