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
| (function ($) { | |
| Drupal.fooModule = Drupal.enrich || {}; | |
| Drupal.fooModule.copyToTextarea = function($field, $value, settings) { | |
| for (var editor in settings.wysiwyg.configs) break; | |
| $("textarea[name^='"+ $field +"']").val($.trim($value)); | |
| var editorid = $("textarea[name^='"+ $field +"'].text-full").attr('id'); | |
| if (typeof editorid != 'undefined' && editorid.length > 0) { | |
| if (editor == 'tinymce') { | |
| tinyMCE.execInstanceCommand(editorid, 'mceSetContent', false, $.trim(html)); |
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 | |
| // Line - 1811 - under "panels_get_pane_links_alter" | |
| // remove the prefix block- to get the name. | |
| $name_of_block = ltrim( $prefixed_name, $subtype_prefix_hyphen); | |
| // correct Method | |
| if (substr($prefixed_name, 0, strlen($subtype_prefix_hyphen)) == $subtype_prefix_hyphen) { | |
| $name_of_block = substr($prefixed_name, strlen($subtype_prefix_hyphen)); | |
| } |
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 | |
| function axelerant_custom_username_form($form, &$form_state) { | |
| $default_user = user_load(3); | |
| $form['name'] = array( | |
| '#type' => 'textfield', | |
| '#title' => t('Search for Contributor'), | |
| '#autocomplete_path' => 'user/autocomplete', | |
| '#default_value' => $default_user->name, |
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 | |
| function redis_set() { | |
| $backend = new Redis_Cache('cache_sweepstakes'); | |
| $backend->set('sweepstakes:63:1', 100, CACHE_PERMANENT); | |
| dpm($backend); | |
| return ''; | |
| } |
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
| example: | |
| css: | |
| theme: | |
| css/example.css: {} | |
| js: | |
| js/example.js: {} |
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 | |
| namespace Drupal\custom_decorator_base; | |
| use Symfony\Component\HttpFoundation\RequestStack; | |
| /** | |
| * Class OriginalService | |
| */ | |
| class OriginalService implements CustomDecoratorInterface { |
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
| services: | |
| custom_decorator_base.base: | |
| class: Drupal\custom_decorator_base\OriginalService | |
| arguments: ['@request_stack'] |
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 | |
| $base = \Drupal::service('custom_decorator_base.base'); | |
| print $base->helper(); |
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
| services: | |
| custom_decorator_override.base: | |
| class: Drupal\custom_decorator_override\OriginalServiceOverride | |
| decorates: custom_decorator_base.base | |
| decoration_priority: 9 | |
| public: false | |
| arguments: ['@custom_decorator_override.base.inner', '@request_stack'] |
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 | |
| /** | |
| * Replace drupal core token service with our own. | |
| */ | |
| class TokenServiceProvider extends ServiceProviderBase { | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function alter(ContainerBuilder $container) { |