This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Example</title> | |
</head> | |
<body> | |
<div> | |
<picture> | |
<source srcset="/sites/default/files/styles/large_3_2_768x512/public/borscht-with-pork-ribs-umami.jpg 1x, /sites/default/files/styles/large_3_2_2x/public/borscht-with-pork-ribs-umami.jpg 2x" media="all and (min-width: 960px)" type="image/jpeg" width="768" height="512"> | |
<source srcset="/sites/default/files/styles/medium_3_2_600x400/public/borscht-with-pork-ribs-umami.jpg 1x, /sites/default/files/styles/medium_3_2_2x/public/borscht-with-pork-ribs-umami.jpg 2x" media="all and (min-width: 768px)" type="image/jpeg" width="600" height="400"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uuid: 7734ecc3-f72f-4a40-9670-de43d599a102 | |
langcode: en | |
status: open | |
dependencies: { } | |
open: null | |
close: null | |
weight: 0 | |
uid: 4 | |
template: false | |
archive: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$options = [ | |
1 => '$1', | |
10 => '$10', | |
]; | |
if ($path == 'liberia') { | |
$options = [ | |
2 => '$2', | |
100 => '$100', | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source: | |
plugin: d6_term_node | |
vid: 1 | |
process: | |
nid: | |
- | |
plugin: migration | |
migration: | |
- d6_node__blog | |
- d6_node__page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Nodes extends SqlBase { | |
/** | |
* {@inheritdoc} | |
*/ | |
public function query() { | |
$query = $this->select('node', 'n') | |
->fields('n', ['nid']); | |
// Add the value for the custom id. | |
$query->addExpression(':now', 'current__date', [':now' => date('Ymd')]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Migrate | |
======= | |
A data import or migration consists of three phases: extract, transform, load. | |
Extract/Source plugins | |
---------------------- | |
For the extract phase Migrate has source plugins. Compared to Feeds, the source plugins seems to be responsible for both | |
fetching and parsing. The SQL source is the most commonly used source plugin. Unlike Feeds, for SQL based sources, a custom | |
source must exist for every combination of database source type (d6, d7, wordpress, etc.) and data type (files, users, nodes). | |
For XML based sources (and likely also for JSON and CSV based sources) it works more like Feeds: one configurable source plugin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\commerce_quickbooks_enterprise\SoapBundle\Services; | |
use Drupal\commerce_quickbooks_enterprise\QbeUtilities; | |
use Drupal\Core\Config\ConfigFactoryInterface; | |
use Drupal\Core\Entity\EntityTypeManagerInterface; | |
use Drupal\Core\State\StateInterface; | |
use Drupal\migrate\MigrateExecutable; | |
use Drupal\migrate\MigrateMessage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker run --rm -ti -v $PWD:/app dockerizedphp/churn run core/modules/migrate_drupal_ui/src/ core/modules/migrate_drupal/src/ core/modules/migrate/src/ | |
___ _ _ __ __ ____ _ _ ____ _ _ ____ | |
/ __)( )_( )( )( )( _ \( \( )___( _ \( )_( )( _ \ | |
( (__ ) _ ( )(__)( ) / ) ((___))___/ ) _ ( )___/ | |
\___)(_) (_)(______)(_)\_)(_)\_) (__) (_) (_)(__) https://github.com/bmitch/churn-php | |
+---------------------------------------------------------------------------+---------------+------------+-------+ | |
| File | Times Changed | Complexity | Score | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\example\EventSubscriber; | |
use Drupal\Core\Routing\CurrentRouteMatch; | |
use Drupal\Core\Session\AccountProxyInterface; | |
use Drupal\Core\Url; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use Symfony\Component\HttpFoundation\RedirectResponse; | |
use Symfony\Component\HttpKernel\Event\FilterResponseEvent; |
NewerOlder