upgraded core, fixed customs modules

This commit is contained in:
2022-02-15 11:22:01 +01:00
parent 7bc35bdc1f
commit 1f07e66fe6
82 changed files with 38856 additions and 1772 deletions

View File

@@ -21,7 +21,7 @@ class AjaxLoginBlock extends ControllerBase {
// \Drupal::logger('materio_user')->notice($language);
$this->bid = "userlogin";
$this->block = Block::load($this->bid);
$this->block_builded = \Drupal::entityManager()->getViewBuilder('block')->view($this->block);
$this->block_builded = \Drupal::entityTypeManager()->getViewBuilder('block')->view($this->block);
}
/**

View File

@@ -0,0 +1,44 @@
<?php
namespace Drupal\materio_user;
use Drupal\Core\Security\TrustedCallbackInterface;
/**
* Provides a trusted callback to alter the commerce cart block.
*
* @see olla_common_block_view_commerce_cart_alter()
*/
class MaterioUserLoginBlockAlterRender implements TrustedCallbackInterface {
/**
* {@inheritdoc}
*/
public static function trustedCallbacks() {
return ['preRender'];
}
/**
* Sets - #pre_render callback.
*/
public static function preRender($build) {
$user_links = &$build['content']['user_links'];
$items = &$user_links['#items'];
unset($items['create_account']);
// $items['create_account']['#url']->mergeOptions(array(
// "attributes" => array(
// "@click.prevent" => "create_account"
// )
// ));
// Do not handle passward reset with vue
// $items['request_password']['#url']->mergeOptions(array(
// 'attributes' => array(
// "@click.prevent" => "request_password"
// )
// ));
return $build;
}
}