This file contains hidden or 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
admin_toolbar: 0 | |
admin_toolbar_tools: 0 | |
automated_cron: 0 | |
block: 0 | |
breakpoint: 0 | |
composer_manager: 0 | |
config: 0 | |
config_readonly: 0 | |
config_update: 0 | |
content_entity_base: 0 |
This file contains hidden or 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
language: php | |
sudo: true | |
dist: trusty | |
php: | |
- 7 | |
matrix: | |
fast_finish: true | |
addons: | |
apt: | |
packages: |
This file contains hidden or 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 | |
/** | |
* @file | |
* Contains \Drupal\migrate_source_csv\Plugin\migrate\source\CSV. | |
*/ | |
namespace Drupal\nica_migrate\Plugin\migrate\source; | |
use Drupal\migrate_source_csv\Plugin\migrate\source\CSV; | |
use Drupal\migrate_source_csv\CSVFileObject; |
This file contains hidden or 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 | |
/** | |
* @file | |
* Contains \Drupal\node\EventSubscriber\NicaEntityAdminRouteSubscriber. | |
*/ | |
namespace Drupal\nica_entity\EventSubscriber; | |
use Drupal\Core\Entity\EntityManagerInterface; |
This file contains hidden or 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
/** | |
* Hook to register the CKEditor plugin - it would appear in the plugins list on the profile setting page. | |
*/ | |
function hook_ckeditor_plugin() { | |
return array( | |
'codemirror' => array( | |
// Name of the plugin used to write it. | |
'name' => 'codemirror', | |
// Description of the plugin - it would be displayed in the plugins management section of profile settings. | |
'desc' => t('Plugin description'), |
This file contains hidden or 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
$url = 'https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452'; | |
$client = new \GuzzleHttp\Client; | |
$response = $client->get($url, [ | |
'headers' => ['Accept' => 'application/json'], | |
])->getBody(); | |
$array = json_decode($response, TRUE); | |
$iterator = new \RecursiveIteratorIterator( | |
new \RecursiveArrayIterator($array), | |
\RecursiveIteratorIterator::SELF_FIRST); | |
// Recurse through the result array. When there is an array of items at the |
This file contains hidden or 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
SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (ascii_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '=': SELECT map.* | |
FROM | |
{migrate_map_highest_level_education} map | |
WHERE (map.sourceid1 = :db_condition_placeholder_0); Array | |
( | |
[:db_condition_placeholder_0] => Universitario | |
) |
This file contains hidden or 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
/** | |
* Implements hook_form_FORM_ID_alter(). | |
*/ | |
function tpc_views_form_views_exposed_form_alter(&$form, &$form_state, $form_id) { | |
if ($form_state['view']->name == 'tpc_model_estimages') { | |
} | |
} |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
drush ev '\Drupal::entityManager()->getStorage("migration")->load("foo")->delete();' |