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: url | |
data_fetcher_plugin: http | |
data_parser_plugin: json | |
urls: http://sourcesite.com/jsonapi/node/article | |
ids: | |
nid: | |
type: integer | |
item_selector: data/ | |
fields: |
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
# Create database user with name 'bob' and previously hashed mysql native password '*EE0D72C1085C46C5278932678FBE2C6A782821B4' with all database privileges | |
- mysql_user: | |
name: bob | |
password: '*EE0D72C1085C46C5278932678FBE2C6A782821B4' | |
encrypted: yes | |
priv: '*.*:ALL' | |
state: present |
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
$node = ['119' => '119]; | |
$node = $this->entityTypeManager->getStorage('node')->load(array_shift($nodes)); | |
vs | |
$node = $this->entityTypeManager->getStorage('node')->loadMultiple($nodes); |
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
process: | |
type: | |
plugin: default_value | |
default_value: article | |
title: post_title | |
nid: ID | |
uid: | |
plugin: default_value | |
default_value: 1 | |
sticky: |
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 | |
$entity_wrapper->field_date_project_posted->set(array( | |
'value' => $dt->format('Y-m-d'), | |
'value2' => $dt2->format('Y-m-d'), | |
)); |
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 | |
$node = entity_meta_datawrapper('node', $nid'); | |
$node->field_something[] = $someValue; | |
$node = $node->save(); | |
if ($node->nid) { | |
//sucess | |
} |
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
l(t('Link name you want the user to see'), 'sites/default/files/docs/docname.pdf'); or if the file is an entity (ignore this part if you are confused now) l(t('Link name you want the user to see'), drupal_get_path_alias( 'sites/default/files/docs/docname.pdf')); |
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 | |
l(t('%fieldvaluehere rest of my string', array('%fieldvaluehere' =>$field_result[0]['value'])); |
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
#!/bin/sh | |
echo "Installing homebrew..." | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Update homebrew recipes | |
brew update | |
#taps |
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
#!/usr/bin/env python | |
# | |
# Copyright 2009 Empeeric LTD. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
NewerOlder