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 | |
// Autoload Url and Link classes. | |
use Drupal\Core\Url; | |
use Drupal\Core\Link; | |
/** | |
* External link | |
*/ | |
$url = Url::fromUri('https://colorfield.be'); |
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 | |
/** | |
* @file | |
* Contains Drupal\mymodule\Plugin\Block\ImageRenderExampleBlockResponsive. | |
*/ | |
namespace Drupal\mymodule\Plugin\Block; | |
use Drupal\Core\Block\BlockBase; |
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
var map = L.map( 'map' ); | |
L.Map.prototype.panToOffset = function (latlng, offset, options) { | |
var x = this.latLngToContainerPoint(latlng).x - offset[0] | |
var y = this.latLngToContainerPoint(latlng).y - offset[1] | |
var point = this.containerPointToLatLng([x, y]) | |
return this.setView(point, this._zoom, { pan: options }) | |
} | |
function centerMap(){ |
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 | |
/** | |
* Completely reverts a feature based on the settings in its .info file. | |
* | |
* @param string $feature_module | |
* Name of feature/module to revert. | |
*/ | |
function full_feature_revert($feature_module) { | |
$info = drupal_parse_info_file(drupal_get_path('module', $feature_module) . '/' . $feature_module . '.info'); |