Merge branch 'master' of https://figureslibres.io/gogs/bachir/drupal-reha
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
"drupal/login_destination": "^2.0@beta",
|
"drupal/login_destination": "^2.0@beta",
|
||||||
"drupal/mailsystem": "^4.4",
|
"drupal/mailsystem": "^4.4",
|
||||||
"drupal/matomo": "^1.23",
|
"drupal/matomo": "^1.23",
|
||||||
|
"drupal/menu_trail_by_path": "^2.0",
|
||||||
"drupal/mimemail": "^1.0@alpha",
|
"drupal/mimemail": "^1.0@alpha",
|
||||||
"drupal/notify": "^2.0@beta",
|
"drupal/notify": "^2.0@beta",
|
||||||
"drupal/page_manager": "^4.0@RC",
|
"drupal/page_manager": "^4.0@RC",
|
||||||
|
|||||||
Generated
+61
-1
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "6791033095e7dafc3474d1203ca03d50",
|
"content-hash": "d325be3b3728dbf80aa71107fd2d55b1",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "asm89/stack-cors",
|
"name": "asm89/stack-cors",
|
||||||
@@ -6152,6 +6152,66 @@
|
|||||||
"issues": "https://www.drupal.org/project/issues/menu_position"
|
"issues": "https://www.drupal.org/project/issues/menu_position"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "drupal/menu_trail_by_path",
|
||||||
|
"version": "2.0.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.drupalcode.org/project/menu_trail_by_path.git",
|
||||||
|
"reference": "2.0.1"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://ftp.drupal.org/files/projects/menu_trail_by_path-2.0.1.zip",
|
||||||
|
"reference": "2.0.1",
|
||||||
|
"shasum": "3c2c1b0ee669c26e6ccba8a345605b7c932be2bf"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"drupal/core": "^8.8 || ^9.0 || ^10"
|
||||||
|
},
|
||||||
|
"type": "drupal-module",
|
||||||
|
"extra": {
|
||||||
|
"drupal": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"datestamp": "1701298206",
|
||||||
|
"security-coverage": {
|
||||||
|
"status": "covered",
|
||||||
|
"message": "Covered by Drupal's security advisory policy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packages.drupal.org/8/downloads",
|
||||||
|
"license": [
|
||||||
|
"GPL-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Berdir",
|
||||||
|
"homepage": "https://www.drupal.org/user/214652"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "davy-r",
|
||||||
|
"homepage": "https://www.drupal.org/user/3278771"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mbovan",
|
||||||
|
"homepage": "https://www.drupal.org/user/3149657"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "redndahead",
|
||||||
|
"homepage": "https://www.drupal.org/user/160320"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SeriousMatters",
|
||||||
|
"homepage": "https://www.drupal.org/user/290439"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Expand menus and set active-trail according to the current path.",
|
||||||
|
"homepage": "https://www.drupal.org/project/menu_trail_by_path",
|
||||||
|
"support": {
|
||||||
|
"source": "https://git.drupalcode.org/project/menu_trail_by_path"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "drupal/mimemail",
|
"name": "drupal/mimemail",
|
||||||
"version": "1.0.0-alpha6",
|
"version": "1.0.0-alpha6",
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
uuid: 209ab91d-0f6f-44a8-95a3-7f7d0a9f3e4b
|
|
||||||
langcode: fr
|
|
||||||
status: true
|
|
||||||
dependencies:
|
|
||||||
module:
|
|
||||||
- config_pages
|
|
||||||
- user
|
|
||||||
theme:
|
|
||||||
- reha
|
|
||||||
id: reha_config_pages_3
|
|
||||||
theme: reha
|
|
||||||
region: sidebar_second
|
|
||||||
weight: 0
|
|
||||||
provider: null
|
|
||||||
plugin: config_pages_block
|
|
||||||
settings:
|
|
||||||
id: config_pages_block
|
|
||||||
label: 'Documents en téléchargement'
|
|
||||||
label_display: visible
|
|
||||||
provider: config_pages
|
|
||||||
config_page_type: documents_en_telechargement
|
|
||||||
config_page_view_mode: full
|
|
||||||
visibility:
|
|
||||||
user_role:
|
|
||||||
id: user_role
|
|
||||||
negate: false
|
|
||||||
context_mapping:
|
|
||||||
user: '@user.current_user_context:current_user'
|
|
||||||
roles:
|
|
||||||
collaborateur: collaborateur
|
|
||||||
@@ -9,7 +9,7 @@ dependencies:
|
|||||||
id: reha_contenudelapageprincipale
|
id: reha_contenudelapageprincipale
|
||||||
theme: reha
|
theme: reha
|
||||||
region: content
|
region: content
|
||||||
weight: -5
|
weight: -6
|
||||||
provider: null
|
provider: null
|
||||||
plugin: system_main_block
|
plugin: system_main_block
|
||||||
settings:
|
settings:
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ dependencies:
|
|||||||
config:
|
config:
|
||||||
- system.menu.main
|
- system.menu.main
|
||||||
module:
|
module:
|
||||||
|
- block_class
|
||||||
- menu_block
|
- menu_block
|
||||||
theme:
|
theme:
|
||||||
- reha
|
- reha
|
||||||
@@ -24,7 +25,7 @@ settings:
|
|||||||
label_link: false
|
label_link: false
|
||||||
label_type: block
|
label_type: block
|
||||||
level: 1
|
level: 1
|
||||||
depth: 0
|
depth: 1
|
||||||
expand_all_items: false
|
expand_all_items: false
|
||||||
parent: 'main:'
|
parent: 'main:'
|
||||||
suggestion: main
|
suggestion: main
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ dependencies:
|
|||||||
id: reha_onglets
|
id: reha_onglets
|
||||||
theme: reha
|
theme: reha
|
||||||
region: content
|
region: content
|
||||||
weight: -6
|
weight: -5
|
||||||
provider: null
|
provider: null
|
||||||
plugin: local_tasks_block
|
plugin: local_tasks_block
|
||||||
settings:
|
settings:
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
uuid: 5cc94347-dd4a-4c9f-896f-27367c9542ac
|
||||||
|
langcode: fr
|
||||||
|
status: true
|
||||||
|
dependencies:
|
||||||
|
module:
|
||||||
|
- reha_mod
|
||||||
|
theme:
|
||||||
|
- reha
|
||||||
|
id: reha_prevnextblock
|
||||||
|
theme: reha
|
||||||
|
region: content
|
||||||
|
weight: -8
|
||||||
|
provider: null
|
||||||
|
plugin: prevnext_block
|
||||||
|
settings:
|
||||||
|
id: prevnext_block
|
||||||
|
label: 'PrevNext Block'
|
||||||
|
label_display: '0'
|
||||||
|
provider: reha_mod
|
||||||
|
visibility: { }
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
uuid: 52a1924b-6fb1-445a-80e1-181520342263
|
|
||||||
langcode: fr
|
|
||||||
status: true
|
|
||||||
dependencies: { }
|
|
||||||
id: documents_en_telechargement
|
|
||||||
label: 'Documents en téléchargement'
|
|
||||||
token: true
|
|
||||||
context:
|
|
||||||
show_warning: true
|
|
||||||
group:
|
|
||||||
language: false
|
|
||||||
fallback:
|
|
||||||
language: ''
|
|
||||||
menu:
|
|
||||||
path: /edit/contenusentelechargement
|
|
||||||
weight: 0
|
|
||||||
description: ''
|
|
||||||
-34
@@ -1,34 +0,0 @@
|
|||||||
uuid: 1cd937cd-f7dd-4078-843d-d6345e217438
|
|
||||||
langcode: fr
|
|
||||||
status: true
|
|
||||||
dependencies:
|
|
||||||
config:
|
|
||||||
- config_pages.type.documents_en_telechargement
|
|
||||||
- field.field.config_pages.documents_en_telechargement.field_dossiers
|
|
||||||
module:
|
|
||||||
- paragraphs
|
|
||||||
id: config_pages.documents_en_telechargement.default
|
|
||||||
targetEntityType: config_pages
|
|
||||||
bundle: documents_en_telechargement
|
|
||||||
mode: default
|
|
||||||
content:
|
|
||||||
field_dossiers:
|
|
||||||
type: paragraphs
|
|
||||||
weight: 0
|
|
||||||
region: content
|
|
||||||
settings:
|
|
||||||
title: Paragraphe
|
|
||||||
title_plural: Paragraphs
|
|
||||||
edit_mode: open
|
|
||||||
closed_mode: summary
|
|
||||||
autocollapse: none
|
|
||||||
closed_mode_threshold: 0
|
|
||||||
add_mode: dropdown
|
|
||||||
form_display_mode: default
|
|
||||||
default_paragraph_type: ''
|
|
||||||
features:
|
|
||||||
collapse_edit_all: collapse_edit_all
|
|
||||||
duplicate: duplicate
|
|
||||||
third_party_settings: { }
|
|
||||||
hidden:
|
|
||||||
label: true
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
uuid: 7a5b4208-5208-4cb6-84ca-89c4ef602be4
|
|
||||||
langcode: fr
|
|
||||||
status: true
|
|
||||||
dependencies:
|
|
||||||
config:
|
|
||||||
- config_pages.type.documents_en_telechargement
|
|
||||||
- field.field.config_pages.documents_en_telechargement.field_dossiers
|
|
||||||
module:
|
|
||||||
- entity_reference_revisions
|
|
||||||
id: config_pages.documents_en_telechargement.default
|
|
||||||
targetEntityType: config_pages
|
|
||||||
bundle: documents_en_telechargement
|
|
||||||
mode: default
|
|
||||||
content:
|
|
||||||
field_dossiers:
|
|
||||||
type: entity_reference_revisions_entity_view
|
|
||||||
label: visually_hidden
|
|
||||||
settings:
|
|
||||||
view_mode: default
|
|
||||||
link: ''
|
|
||||||
third_party_settings: { }
|
|
||||||
weight: 0
|
|
||||||
region: content
|
|
||||||
hidden:
|
|
||||||
search_api_excerpt: true
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
uuid: ace2ba43-b55a-4771-913f-60f5aaca027a
|
|
||||||
langcode: fr
|
|
||||||
status: true
|
|
||||||
dependencies:
|
|
||||||
config:
|
|
||||||
- config_pages.type.documents_en_telechargement
|
|
||||||
- field.storage.config_pages.field_dossiers
|
|
||||||
- paragraphs.paragraphs_type.dossier
|
|
||||||
module:
|
|
||||||
- entity_reference_revisions
|
|
||||||
id: config_pages.documents_en_telechargement.field_dossiers
|
|
||||||
field_name: field_dossiers
|
|
||||||
entity_type: config_pages
|
|
||||||
bundle: documents_en_telechargement
|
|
||||||
label: Dossiers
|
|
||||||
description: ''
|
|
||||||
required: false
|
|
||||||
translatable: false
|
|
||||||
default_value: { }
|
|
||||||
default_value_callback: ''
|
|
||||||
settings:
|
|
||||||
handler: 'default:paragraph'
|
|
||||||
handler_settings:
|
|
||||||
target_bundles:
|
|
||||||
dossier: dossier
|
|
||||||
negate: 0
|
|
||||||
target_bundles_drag_drop:
|
|
||||||
dossier:
|
|
||||||
weight: 3
|
|
||||||
enabled: true
|
|
||||||
partenaire:
|
|
||||||
weight: 4
|
|
||||||
enabled: false
|
|
||||||
field_type: entity_reference_revisions
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
uuid: 02de0646-5489-4d54-bd15-457a4891e3ff
|
|
||||||
langcode: fr
|
|
||||||
status: true
|
|
||||||
dependencies:
|
|
||||||
module:
|
|
||||||
- config_pages
|
|
||||||
- entity_reference_revisions
|
|
||||||
- paragraphs
|
|
||||||
id: config_pages.field_dossiers
|
|
||||||
field_name: field_dossiers
|
|
||||||
entity_type: config_pages
|
|
||||||
type: entity_reference_revisions
|
|
||||||
settings:
|
|
||||||
target_type: paragraph
|
|
||||||
module: entity_reference_revisions
|
|
||||||
locked: false
|
|
||||||
cardinality: -1
|
|
||||||
translatable: true
|
|
||||||
indexes: { }
|
|
||||||
persist_with_no_fields: false
|
|
||||||
custom_storage: false
|
|
||||||
@@ -3,11 +3,18 @@ langcode: fr
|
|||||||
status: true
|
status: true
|
||||||
dependencies:
|
dependencies:
|
||||||
module:
|
module:
|
||||||
|
- autotitle
|
||||||
- menu_ui
|
- menu_ui
|
||||||
third_party_settings:
|
third_party_settings:
|
||||||
menu_ui:
|
menu_ui:
|
||||||
available_menus: { }
|
available_menus:
|
||||||
parent: ''
|
- main
|
||||||
|
parent: 'main:views_view:views.sites.page_1'
|
||||||
|
autotitle:
|
||||||
|
enabled: false
|
||||||
|
field: _none
|
||||||
|
fallback_title: 'Untitled [site]'
|
||||||
|
headings: { }
|
||||||
name: Site
|
name: Site
|
||||||
type: site
|
type: site
|
||||||
description: ''
|
description: ''
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ display:
|
|||||||
tags: { }
|
tags: { }
|
||||||
block_1:
|
block_1:
|
||||||
id: block_1
|
id: block_1
|
||||||
display_title: Block
|
display_title: 'home Block'
|
||||||
display_plugin: block
|
display_plugin: block
|
||||||
position: 2
|
position: 2
|
||||||
display_options:
|
display_options:
|
||||||
@@ -178,6 +178,84 @@ display:
|
|||||||
type: none
|
type: none
|
||||||
options:
|
options:
|
||||||
offset: 0
|
offset: 0
|
||||||
|
filters:
|
||||||
|
status:
|
||||||
|
id: status
|
||||||
|
table: node_field_data
|
||||||
|
field: status
|
||||||
|
entity_type: node
|
||||||
|
entity_field: status
|
||||||
|
plugin_id: boolean
|
||||||
|
value: '1'
|
||||||
|
group: 1
|
||||||
|
expose:
|
||||||
|
operator: ''
|
||||||
|
type:
|
||||||
|
id: type
|
||||||
|
table: node_field_data
|
||||||
|
field: type
|
||||||
|
entity_type: node
|
||||||
|
entity_field: type
|
||||||
|
plugin_id: bundle
|
||||||
|
value:
|
||||||
|
site: site
|
||||||
|
field_type_de_site_target_id:
|
||||||
|
id: field_type_de_site_target_id
|
||||||
|
table: node__field_type_de_site
|
||||||
|
field: field_type_de_site_target_id
|
||||||
|
relationship: none
|
||||||
|
group_type: group
|
||||||
|
admin_label: ''
|
||||||
|
plugin_id: taxonomy_index_tid
|
||||||
|
operator: or
|
||||||
|
value:
|
||||||
|
1: 1
|
||||||
|
group: 1
|
||||||
|
exposed: false
|
||||||
|
expose:
|
||||||
|
operator_id: ''
|
||||||
|
label: ''
|
||||||
|
description: ''
|
||||||
|
use_operator: false
|
||||||
|
operator: ''
|
||||||
|
operator_limit_selection: false
|
||||||
|
operator_list: { }
|
||||||
|
identifier: ''
|
||||||
|
required: false
|
||||||
|
remember: false
|
||||||
|
multiple: false
|
||||||
|
remember_roles:
|
||||||
|
authenticated: authenticated
|
||||||
|
reduce: false
|
||||||
|
is_grouped: false
|
||||||
|
group_info:
|
||||||
|
label: ''
|
||||||
|
description: ''
|
||||||
|
identifier: ''
|
||||||
|
optional: true
|
||||||
|
widget: select
|
||||||
|
multiple: false
|
||||||
|
remember: false
|
||||||
|
default_group: All
|
||||||
|
default_group_multiple: { }
|
||||||
|
group_items: { }
|
||||||
|
reduce_duplicates: false
|
||||||
|
vid: type_de_site
|
||||||
|
type: select
|
||||||
|
hierarchy: false
|
||||||
|
limit: true
|
||||||
|
error_message: true
|
||||||
|
save_lineage: false
|
||||||
|
force_deepest: false
|
||||||
|
parent: null
|
||||||
|
level_labels: ''
|
||||||
|
hierarchy_depth: 0
|
||||||
|
required_depth: 0
|
||||||
|
none_label: '- Please select -'
|
||||||
|
filter_groups:
|
||||||
|
operator: AND
|
||||||
|
groups:
|
||||||
|
1: AND
|
||||||
style:
|
style:
|
||||||
type: default
|
type: default
|
||||||
options: { }
|
options: { }
|
||||||
@@ -190,6 +268,9 @@ display:
|
|||||||
pager: false
|
pager: false
|
||||||
style: false
|
style: false
|
||||||
row: false
|
row: false
|
||||||
|
filters: false
|
||||||
|
filter_groups: false
|
||||||
|
display_description: ''
|
||||||
display_extenders:
|
display_extenders:
|
||||||
matomo:
|
matomo:
|
||||||
enabled: false
|
enabled: false
|
||||||
@@ -207,6 +288,7 @@ display:
|
|||||||
contexts:
|
contexts:
|
||||||
- 'languages:language_content'
|
- 'languages:language_content'
|
||||||
- 'languages:language_interface'
|
- 'languages:language_interface'
|
||||||
|
- user
|
||||||
- 'user.node_grants:view'
|
- 'user.node_grants:view'
|
||||||
- user.roles
|
- user.roles
|
||||||
tags: { }
|
tags: { }
|
||||||
@@ -432,7 +514,17 @@ display:
|
|||||||
operator: AND
|
operator: AND
|
||||||
groups:
|
groups:
|
||||||
1: AND
|
1: AND
|
||||||
|
style:
|
||||||
|
type: default
|
||||||
|
options: { }
|
||||||
|
row:
|
||||||
|
type: 'entity:node'
|
||||||
|
options:
|
||||||
|
relationship: none
|
||||||
|
view_mode: default
|
||||||
defaults:
|
defaults:
|
||||||
|
style: false
|
||||||
|
row: false
|
||||||
filters: false
|
filters: false
|
||||||
filter_groups: false
|
filter_groups: false
|
||||||
footer: false
|
footer: false
|
||||||
@@ -473,7 +565,7 @@ display:
|
|||||||
category_fallback: ''
|
category_fallback: ''
|
||||||
category_facets: { }
|
category_facets: { }
|
||||||
category_facets_concat_separator: ', '
|
category_facets_concat_separator: ', '
|
||||||
path: lessitespilotes
|
path: sitespilotes
|
||||||
menu:
|
menu:
|
||||||
type: normal
|
type: normal
|
||||||
title: 'Les sites pilotes'
|
title: 'Les sites pilotes'
|
||||||
|
|||||||
@@ -3,3 +3,5 @@ type: module
|
|||||||
description: Provides additional functionality for the site.
|
description: Provides additional functionality for the site.
|
||||||
package: Custom
|
package: Custom
|
||||||
core_version_requirement: ^9 || ^10
|
core_version_requirement: ^9 || ^10
|
||||||
|
dependencies:
|
||||||
|
- drupal:block
|
||||||
@@ -23,4 +23,5 @@ function reha_mod_form_node_operation_form_alter(&$form, \Drupal\Core\Form\FormS
|
|||||||
if($type === 'operation'){
|
if($type === 'operation'){
|
||||||
$form['field_adresse']['widget'][0]['#type'] = 'container';
|
$form['field_adresse']['widget'][0]['#type'] = 'container';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Drupal\reha_mod\Plugin\Block;
|
||||||
|
|
||||||
|
use Drupal\Core\Block\BlockBase;
|
||||||
|
use Drupal\Core\Block\Attribute\Block;
|
||||||
|
// use Drupal\Core\StringTranslation\TranslatableMarkup;
|
||||||
|
use Drupal\Core\Link;
|
||||||
|
use Drupal\Core\Render\Markup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides a 'Prevnext' Block.
|
||||||
|
* @Block(
|
||||||
|
* id = "prevnext_block",
|
||||||
|
* admin_label = @Translation("PrevNext Block"),
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
class PrevNext extends BlockBase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function build() {
|
||||||
|
$return = null;
|
||||||
|
/** @var Drupal\node\Entity\Node */
|
||||||
|
$node = \Drupal::routeMatch()->getParameter('node');
|
||||||
|
if ($node) {
|
||||||
|
$nodetype = $node->getType();
|
||||||
|
if($nodetype === "site"){
|
||||||
|
$numerodesite = $node->get('field_numero_site')->getString();
|
||||||
|
$allSites = \Drupal::entityTypeManager()->getStorage('node')
|
||||||
|
->loadByProperties(['type' => 'site', 'status' => 1, 'field_type_de_site' => 1]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
usort($allSites, function($a, $b){
|
||||||
|
$numA = $a->get('field_numero_site')->getString();
|
||||||
|
$numB = $b->get('field_numero_site')->getString();
|
||||||
|
if ($numA == $numB) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return ($numA < $numB) ? -1 : 1;
|
||||||
|
});
|
||||||
|
$prevnode = null;
|
||||||
|
$nextnode = null;
|
||||||
|
foreach($allSites as $index => $site){
|
||||||
|
$n = $site->get('field_numero_site')->getString();
|
||||||
|
if($n === $numerodesite){
|
||||||
|
$prevnode = $index - 1 >= 0 ? $allSites[$index - 1] : null;
|
||||||
|
$nextnode = $index + 1 < count($allSites) ? $allSites[$index + 1] : null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
$return = [
|
||||||
|
'#cache' => [
|
||||||
|
'max-age' => 0,
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($prevnode) {
|
||||||
|
$prev_link_title = Markup::create('<span>Site pilote précédent</span>');
|
||||||
|
$prev_options = ['absolute' => FALSE, 'attributes' => ['class' => 'prev-site']];
|
||||||
|
$prev_link_object = Link::createFromRoute($prev_link_title, 'entity.node.canonical', ['node' => $prevnode->id()], $prev_options);
|
||||||
|
$return[] = $prev_link_object->toRenderable();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($nextnode) {
|
||||||
|
$next_link_title = Markup::create('<span>Site pilote suivant</span>');
|
||||||
|
$next_options = ['absolute' => FALSE, 'attributes' => ['class' => 'next-site']];
|
||||||
|
$next_link_object = Link::createFromRoute($next_link_title, 'entity.node.canonical', ['node' => $nextnode->id()], $next_options);
|
||||||
|
$return[] = $next_link_object->toRenderable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
// return [
|
||||||
|
// '#markup' => $this->t('Hello, World!'),
|
||||||
|
// ];
|
||||||
|
}
|
||||||
|
public function getCacheMaxAge() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user