Skip to content

Instantly share code, notes, and snippets.

View vensires's full-sized avatar

Panagiotis Moutsopoulos vensires

  • E-sepia
  • Athens, Greece
View GitHub Profile
<?php
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
/**
* Implements hook_permission().
*/
function payment_report_permission() {
return [
@Niklan
Niklan / README.md
Last active December 17, 2020 06:50
Drupal 8: Batched hook_post_update_NAME() and hook_update_N() example
@rocketeerbkw
rocketeerbkw / example.php
Last active June 23, 2023 18:42
How to migrate multi-value link field in Drupal 8
<?php
class Example extends SourcePluginBase {
public function prepareRow(Row $row) {
parent::prepareRow($row);
// I do some data manipulation to end up with an array that looks like this,
// which I want to import into multi-value link field.
$links = [
@JaseHadd
JaseHadd / ioslocaleidentifiers.csv
Last active March 31, 2022 08:23 — forked from jacobbubu/ioslocaleidentifiers.csv
iOS Locale Identifiers
localeIdentifier Description
eu Basque
hr_BA Croatian (Bosnia & Herzegovina)
en_CM English (Cameroon)
rw_RW Kinyarwanda (Rwanda)
en_SZ English (Swaziland)
tk_Latn Turkmen (Latin)
he_IL Hebrew (Israel)
ar Arabic
uz_Arab Uzbek (Arabic)
@dmouse
dmouse / SubRequestController.php
Last active November 10, 2023 11:10
Drupal 8: how to create a sub-request
<?php
/**
* @file
* Contains Drupal\dmouse\Controller\SubRequestController.
* Generated by drupal/console.
*/
namespace Drupal\dmouse\Controller;