Solr index delete all documents
<delete><query>*:*</query></delete>
<delete><query>*:*</query></delete>
function findAspectRatio(int $width, int $height) {
// search for greatest common divisor
$greatestCommonDivisor = static function ($width, $height) use (&$greatestCommonDivisor) {
return ($width % $height) ? $greatestCommonDivisor($height, $width % $height) : $height;
};
$divisor = $greatestCommonDivisor($width, $height);
return $width / $divisor . ':' . $height / $divisor;
}
(function ($, Drupal, drupalSettings) {
'use strict';
Drupal.behaviors.my_behavior = {
attach: function (context, settings) {
$(document, context).once('my_behavior').each( function() {
myInit();
});
}
}
} (jQuery, Drupal, drupalSettings));
$node = \Drupal::routeMatch()->getParameter('node');
if ($node instanceof \Drupal\node\NodeInterface) {
$nid = $node->id();
}
Few months ago I wrote an article about an implementation over a D7 site I was working on. A friend of mine told me, "Hey, D7 is dead already, why are you still doing those projects".
The javascript autcomplete feature in Drupal 7 is very useful, but sometimes you might need to make some tweaks there.
The last year, I wrote about how to consume a ASMX SOAP service to be precise I am talking about the Banco
Few months ago, I shared a way to create a processor where I was combine two facets together.
There is a module named Video Embed Field which allows you to embed videos from different providers and show their thum