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 | |
/** | |
* Generate a simple map with a location pointer. | |
* | |
* @param string $location | |
* Location to use (for example the address). | |
* @param string $country | |
* Name of the country to use. | |
* | |
* @return string |
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_wysiwyg_editor_settings_alter(). | |
*/ | |
function MODULENAME_wysiwyg_editor_settings_alter(&$settings, $context) { | |
global $base_url; | |
if ($context['profile']->editor == 'ckeditor') { | |
$skins_path = drupal_get_path('module', 'MODULENAME') . '/ckeditor/skins'; | |
// For flexibility we use a variable to get the active skin name. |
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_form_FORM_ID_alter(). | |
* | |
* Alter views exposed forms for collapsible filters. | |
*/ | |
function MYMODULE_form_views_exposed_form_alter(&$form, &$form_state) { | |
if (empty($form_state['view']) || !in_array($form_state['view']->name, array('NAME_OF_VIEW', 'NAME_OF_VIEWS_DISPLAY'))) { | |
// We alter the exposed form of a single views display, so return if this is | |
// not the expected 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 | |
/** | |
* Implements hook_views_pre_view(). | |
*/ | |
function MYMODULE_views_pre_view(&$view, &$display_id, &$args) { | |
if (!in_array($view->name, array('NAME_OF_VIEW', 'NAME_OF_VIEWS_DISPLAY'))) { | |
return; | |
} | |
foreach (array('type') as $filter) { | |
if (!empty($_GET[$filter]) && (is_array($_GET[$filter])) && reset($_GET[$filter]) == 'All') { |
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
(function($) { | |
/** | |
* Change multi-value dropdown to single-value dropdown and back (visually). | |
*/ | |
Drupal.behaviors.collapsibleFilterRewriteMultipleSelect = { | |
attach: function(context, settings) { | |
$.each(Drupal.settings.collapsibleFilter.multiple_selects, function(name, settings) { | |
$('select#edit-' + name) | |
.once('collapsible-filter-multiple-rewrite') |
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
address: | |
name : undpaul GmbH | |
city : Hannover | |
state : NI | |
conuntry: Germany | |
postal : 30449 |
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 | |
/** | |
* Force Drupal to use English as default language on admin pages and for drush. | |
*/ | |
if (empty($_REQUEST) || (!empty($_GET['q']) && strpos($_GET['q'], 'admin') !== FALSE)) { | |
$language_default = array( | |
'language' => 'en', 'name' => 'English', 'native' => 'English', | |
'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', | |
'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => '' | |
); |
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 | |
* Drush commands. | |
*/ | |
use Drupal\Core\Config\ConfigInstaller; | |
use Drupal\Core\Config\FileStorage; | |
use Drupal\Core\Config\InstallStorage; | |
use Drupal\Core\Config\StorageInterface; |
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
/** | |
* @file | |
* Custom behaviors for "SHS alter". | |
*/ | |
(function ($, Drupal) { | |
/** | |
* Test some features. | |
*/ |
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_views_pre_build(). | |
*/ | |
function dingens_search_views_pre_build(ViewExecutable $view) { | |
$functions = []; | |
$functions[] = sprintf('dingens_search_views__%s__pre_build', $view->id()); | |
$functions[] = sprintf('dingens_search_views__%s_%s__pre_build', $view->id(), $view->current_display); | |
foreach ($functions as $callback) { | |
if (is_callable($callback)) { |
OlderNewer