recentpopularlog in

DEV

« earlier   
A Look at Python, Parameterized | Toptal
via Pocket - Ensuring Clean Code: A Look at Python, Parameterized In this post, I’m going to talk about what I consider to be the most important technique or pattern in producing clean, Pythonic code—namely, parameterization. This post is for you if:
IFTTT  Pocket  dev  toptal  engineering  blog 
2 hours ago by mannieschumpert
8 - How can we get Block Bundle Type for block in code? - Drupal Answers
use \Drupal\block_content\BlockContentInterface;


/**
* Implements HOOK_preprocess_block().
*
* @param $variables
*/
function mymodule_preprocess_block(&$variables) {
$content = $variables['elements']['content'];
if (isset($content['#block_content']) && $content['#block_content'] instanceof BlockContentInterface) {

if ($content['#block_content']->bundle() == 'xxx') {
// ...
}

}
}
8  drupal8  drupal  web  dev  cms  computing  module  theme  block  update  refresh  force  cache  disable  twig  specific  howto  question  answer  problem  solution  time  computed  generated  calculated 
4 hours ago by therobyouknow
302 Found
Move fast and migrate things: how we automated migrations in Postgres
medium  dev 
12 hours ago by krzemienski
302 Found
At Benchling, we’re building a platform to help scientists do research. Hundreds of thousands of scientists across academia and enterprise clients use Benchling to store and analyze scientific data, assemble DNA sequences, and design experiments.
Archive  dev  medium 
13 hours ago by krzemienski

Copy this bookmark:





to read