By r_cheh on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
13.0.x
Introduced in version:
13.0.0-alpha19
Issue links:
Description:
Now, each module can add its own options for Group Landing Tabs using the module.group_landing_tabs.yml file. The structure is as follows:
name:
title: Example (required)
route_name: example_route_name (required)
membership: all || member || non-member (defines availability of the tab option – "Member", "Non-member", or "Both"; required)
weight: 100 (defines the tab's position in the options list; required)
group_types: (defines which group types the tab should be available for; optional, defaults to all)
- example_group_type
conditions: (tab visibility depends on the following field values in the current group; optional, uses "and" logic for multiple conditions)
example_field: field_value
Example:
social_flexible_group_book.books:
title: Books
route_name: view.group_books.page_group_books
membership: all
weight: 16
group_types:
- flexible_group
conditions:
enable_books: '1'
The second update - hook_social_group_default_route_types_alter was deprecated, to alter or provide Group Landing Tab functionality for group type, you need to use the next hooks:
hook_social_group_default_route_group_types()hook_social_group_default_route_group_types_alter(array $types)
The routes provided by hook_social_group_default_route_group_types() should be also available in Option List (added by module.group_landing_tabs.yml file), otherwise it will be ignored.
Impacts:
Module developers
Site templates, recipes and distribution developers