Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291043

Theme name is included in block machine name but should be stored as a key instead

$
0
0

Updated: Comment #0

Problem/Motivation

There is code like this scattered throughout core at the moment:

<?php
$config_id
= explode('.', $block->id());
$machine_name = array_pop($config_id);
?>

<?php
list(, $machine_name) = explode('.', $default_theme_block_id);
?>

Whose purpose is to extract the 'powered' from a 'bartik.powered' block ID in order to get the usable "machine name".

Proposed resolution

Remove $theme from the block machine name and store it as a key instead. @tim.plunkett and @xjm said in IRC that config entity query could be useful here.

Remaining tasks

Patch needs to be written.

User interface changes

n/a

API changes

TBD

None yet


Viewing all articles
Browse latest Browse all 291043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>