Querying a group was for some reason complicated
This is working code, as a workaround in using entityquery:
This is working code, as a workaround in using entityquery:
look in theme.liquid to add the javascript to the head
look in header.liquid to find the header HTML in the theme.
Put this in their config:
{
"send_stats": false,
"translate_images": false,
"language_selector" : [
{
"U" : "U",
"T" : "T",
"I" : "OneLinkJS_langSel",
"C" : "C",
"position" : "first"
}
]
}
and the one liner in the head of the document.
\Drupal::logger('ipc_order_sync')->notice('Adding the following order to the enqueJob @order_id
with transaction id of @transaction_id',
[
'@order_id' => $order['order_id'],
'@transaction_id' => $order['transaction_id'],
]);
In your settings.php:
$settings['foo'] = 'bar';
In your code:
use Drupal\Core\Site\Settings;
Settings::get('foo', 'mydefaultvalue');drupal advancedqueue:queue:process ipc_transaction_sync
or
drush advancedqueue:queue:process ipc_transaction_sync
or
drush advancedqueue:queue:process ipc_order_sync
https://stovepipe.systems/post/avoiding-static-in-your-code
If there are not dependencies and it's not a pain to mock in a unit test, or for re-use then static is fine. A service lets you encapsulate everything and all the dependencies using dependency injection, to make sure all the dependencies are easy to setup.
Temporary fix for:
The URI '' is invalid. You
must use a valid URI scheme. in
Drupal\Core\Url::fromUri() (line 290 of
/Users/jamesbarnett/sites/IPC/ipcedtr/
This is how I get around that issue locally….
docroot/core/lib/Drupal/Core/Url.php
Line:290
return static::fromUri('http://localhost');
These directions worked with some modifications: https://javorszky.co.uk/2018/05/03/getting-xdebug-working-on-php-7-2-an…
I was using PHP on the command line with homebrew, so installed xdebug with pecl install xdebug
then I was able to put the following in the php.ini file, find the php.ini file for the command line by running php --ini and look for Loaded Configuration File in the output.
The below is for XDEUG 3.0
$result = \Drupal::entityQuery('group')
->condition('type', $type)
->range(0, 20000)
->accessCheck(FALSE)
->execute();
make sure to set accessCheck to FALSE or you'll get no results, entityQuery respects permissions and the drush user won't be running as any particular user.
/**
* Implements hook_mail().
*/
function app_voucher_mail($key, &$message, $params) {
$function = 'app_voucher_mail__' . $key;
if (function_exists($function)) {
return $function($key, $message, $params);
}
/*
* @I Convert the enrollment email to use the new mail handler
* type : improvement
* priority : normal
* labels : refactoring
*/
if (!empty($params['from'])) {
$message['from'] = $params['from'];
}
$message['subject'] = $params['subject'];
$message['body'][] = $params['body'];
}
/**