$bid = 'myblock';
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($block);
$block_manager = \Drupal::service('plugin.manager.block');
/** | |
* Implements hook_theme_suggestions_HOOK_alter() for block templates. | |
*/ | |
function custom_theme_suggestions_node_alter(array &$suggestions, array $variables) { | |
$element = $variables['elements']; | |
// Add template suggestions based on the current view mode. | |
$node = $variables['elements']['#node']; | |
$suggestions[] = 'node__' . $variables['elements']['#view_mode']; | |
$suggestions[] = 'node__' . $node->bundle() . '__' . $variables['elements']['#view_mode']; | |
} |
// Enable Devel module and go to /devel/php | |
$nodes = \Drupal::entityQuery("node") | |
->condition('created', strtotime('-30 days'), '<=') | |
->execute(); | |
$storage_handler = \Drupal::entityTypeManager()->getStorage("node"); | |
// $entities = $storage_handler->loadMultiple(); // Delete ALL nodes. | |
$entities = $storage_handler->loadMultiple($nodes); | |
$storage_handler->delete($entities); |
stop all containers:
docker kill $(docker ps -q)
remove all containers
docker rm $(docker ps -a -q)
remove all docker images
docker rmi $(docker images -q)
Images skilldlabs/php:73-fpm-dev
and :74-fpm-dev
updated
you could use docker run --rm -it skilldlabs/php:74-fpm-dev php -dzend_extension=xdebug -r'xdebug_info();'
to check the v3 used
all Drupal 9.1.0 release will get delay (probably second week of Dec)
The committer team discussed this situation yesterday and we've decided the minor release will now be the second week of December, which will give us more time to deal with PHP's release, corresponding upstream updates, and the latest symfony minor.
The upgrade path is https://xdebug.org/docs/upgrade_guide
<?php | |
$tags['link'] = [HtmlTag::preRenderConditionalComments($element), '<link />' . "\n"]; | |
// Conditional link. | |
$element = [ | |
'#tag' => 'link', | |
'#browsers' => [ | |
'IE' => TRUE, | |
'!IE' => FALSE, | |
], |
<?php | |
/** | |
* {@inheritdoc} | |
*/ | |
protected function assertEntityInstanceFieldMarkup($expected_field_attributes) { | |
if (func_num_args() === 4) { | |
$expected_field_attributes = func_get_arg(3); | |
@trigger_error('Calling ' . __METHOD__ . '() with 4 arguments is deprecated in drupal:9.1.0 and will throw an error in drupal:10.0.0. See https://www.drupal.org/project/drupal/issues/3037436', E_USER_DEPRECATED); | |
} | |
parent::assertEntityInstanceFieldMarkup($this->replaceLayoutBuilderFieldIdKeys($expected_field_attributes)); |
<?php | |
$js_match_field_element_attributes = <<<JS | |
function () { | |
var expectations = $expected_field_attributes_json; | |
var entityCollection = Drupal.quickedit.collections.entities; | |
var entityModel = entityCollection.get('$entity_page_id'); | |
return entityModel.get('fields').reduce(function (result, fieldModel) { | |
var fieldID = fieldModel.get('fieldID'); | |
var element = fieldModel.get('el'); | |
var matches = element.webkitMatchesSelector(expectations[fieldID]); |