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
SELECT REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(`field`, '%20',' '), '%22','"'), '%23','#'), '%24','$'), '%26','&'), '%27','\''), '%28','('), '%29',')'),'%2A','*'), '%2B','+'),'%2C',','),'%2D','-'),'%2E','.'),'%2F','/'),'%3A',':'),'%3B',';'),'%3C',' |
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
### Keybase proof | |
I hereby claim: | |
* I am delta-9 on github. | |
* I am neuviemedelta (https://keybase.io/neuviemedelta) on keybase. | |
* I have a public key ASBniD9q23aGgS_g-YZ7soVRTSRplD8GEyMqJFdjlVeK6wo | |
To claim this, I am signing this object: |
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 | |
/** | |
* Implements hook_tokens(). | |
*/ | |
function cake_tokens($type, $tokens, array $data = array(), array $options = array()) { | |
$sanitize = !empty($options ['sanitize']); | |
$replacements = array(); | |
if ($type == 'cake' && !empty($data['cake'])) { |
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 | |
/** | |
* Implements hook_token_info_alter(). | |
*/ | |
function cake_token_info_alter(&$data) { | |
// Chained tokens for cake. | |
$data ['tokens']['cake']['author'] = array( | |
'name' => t('The cake author'), | |
'description' => t('User author of the cake'), | |
'type' => 'user', |
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 | |
/** | |
* @file | |
* Contains views_head_metadata.module. | |
*/ | |
/** | |
* Implements hook_views_pre_render(). | |
*/ | |
function views_head_metadata_views_pre_render(\Drupal\views\ViewExecutable $view) { |
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 | |
/** | |
* @file | |
* Contains \Drupal\views_head_metadata\Plugin\views\display_extender\HeadMetadata. | |
*/ | |
namespace Drupal\views_head_metadata\Plugin\views\display_extender; | |
use Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase; |
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 | |
/** | |
* Implements hook_install(). | |
*/ | |
function views_head_metadata_install() { | |
// Enable head_metadata plugin. | |
$config = \Drupal::service('config.factory')->getEditable('views.settings'); | |
$display_extenders = $config->get('display_extenders') ?: array(); | |
$display_extenders[] = 'head_metadata'; |
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 | |
/** | |
* @file | |
* Provide views data for our custom module_name. | |
*/ | |
/** | |
* Implements hook_views_data(). | |
*/ | |
function module_name_views_data() { |
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 | |
/** | |
* @file | |
* Contains \Drupal\module_name\Plugin\views\area\MyCustomSiteArea. | |
*/ | |
namespace Drupal\module_name\Plugin\views\area; | |
use Drupal\Core\Form\FormStateInterface; |
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 | |
// Remember original language before this operation. | |
$original_language = \Drupal::configFactory()->getLanguage(); | |
$language = language_load($account->getPreferredLangcode()); | |
// Set the languag without saving, this is actually only for the current script execution: | |
\Drupal::configFactory()->setLanguage($language); | |
// Get the user.mail config object normally, but for the language we just set :) | |
$mail_config = \Drupal::config('user.mail'); |
NewerOlder