Skip to content

Instantly share code, notes, and snippets.

View oksana-c's full-sized avatar

Oksana Cyrwus oksana-c

View GitHub Profile
@oksana-c
oksana-c / FCEntityMigrate.php
Created January 7, 2019 21:33 — forked from teglia/FCEntityMigrate.php
Migrating Field Collections to Paragraphs on an empty Drupal 8 site WITHOUT migrate_tools or migrate_plus
<?php
namespace Drupal\migrate_custom\Plugin\migrate\source;
use Drupal\Core\Database\Query\Condition;
use Drupal\migrate\Row;
use Drupal\migrate_drupal\Plugin\migrate\source\d7\FieldableEntity;
/**
* Drupal 7 file source from database.
@oksana-c
oksana-c / migrate-way-1.php
Created February 17, 2019 20:06 — forked from labboy0276/migrate-way-1.php
Various Drupal 8 Body Migration Techniques Ways
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Plugin\MigrateSourceInterface;
use Drupal\migrate\Row;
/**
* Implements hook_migrate_prepare_row().
*/
function YOUR_MODULE_migrate_prepare_row(Row $row, MigrateSourceInterface $source, MigrationInterface $migration) {
switch ($migration->id()) {
case 'config_name':
@oksana-c
oksana-c / gitflow-breakdown.md
Created April 22, 2019 23:17 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

{
"info": {
"_postman_id": "327e8396-b20c-49f7-8827-214aaa11203c",
"name": "GAO API for PR Tests",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "GAO Product Post",
"request": {
<?php
/**
* Sets an id for the first iframe situated in the element specified by id.
* Needed when wanting to fill in WYSIWYG editor situated in an iframe without identifier.
*
* @Given /^the iframe in element "(?P<element>[^"]*)" has id "(?P<id>[^"]*)"$/
*/
public function theIframeInElementHasId($element_id, $iframe_id) {
$function = <<<JS
@oksana-c
oksana-c / d8-composer-patch-without-version-update.md
Created March 16, 2020 21:47
Apply Drupal 8 patch using Composer without updating package version
  1. edit the composer.json file to add a patch.
"extra": {
    "enable-patching": true,
    "patches": {
        "drupal/core": {
            "<patch1 information>": "<patch1 file path>",
            "<patch2 information>": "<patch2 file path>"
 }