Resolve PrijavaObnovitevGeslaBlock variable caching issue
This commit is contained in:
parent
5ec14f8378
commit
1f43885ddf
@ -53,7 +53,7 @@ function prijava_1ka_theme()
|
||||
|
||||
'prijava_obnovitev_gesla_block' => [
|
||||
'variables' => [
|
||||
|
||||
'lang' => [],
|
||||
]
|
||||
],
|
||||
'prijava_obnovitev_gesla_aktivacija_blok' => [
|
||||
|
@ -20,10 +20,16 @@ class PrijavaObnovitevGeslaBlock extends BlockBase {
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function build() {
|
||||
if(\Drupal::languageManager()->getCurrentLanguage()->getId() == 'sl') {
|
||||
include(__DIR__ . '../../../../../../../../../lang/1.php');
|
||||
} else{
|
||||
include(__DIR__ . '../../../../../../../../../lang/2.php');
|
||||
}
|
||||
|
||||
return [
|
||||
'#theme' => 'prijava_obnovitev_gesla_block',
|
||||
];
|
||||
return [
|
||||
'#theme' => 'prijava_obnovitev_gesla_block',
|
||||
'#lang' => $lang ?? [],
|
||||
];
|
||||
}
|
||||
|
||||
public function getCacheMaxAge() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user