LgmsGuidePageViewBlock
extends BlockBase
in package
Provides a block to display guide page views.
This block displays a list of guide pages associated with the current guide, allowing for quick navigation between them. It also provides links to create, reorder, edit, and delete guide pages if the user has the necessary permissions.
Tags
Table of Contents
Methods
- build() : array<string|int, mixed>
- Builds and returns the renderable array for this block plugin.
- getCacheMaxAge() : int
- Disables caching for this block.
- getCurrentGuideId() : string|null
- Retrieves the ID of the current guide or guide page.
Methods
build()
Builds and returns the renderable array for this block plugin.
public
build() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —A renderable array representing the content of the block.
getCacheMaxAge()
Disables caching for this block.
public
getCacheMaxAge() : int
Return values
int —Returns 0 to indicate that the block should not be cached.
getCurrentGuideId()
Retrieves the ID of the current guide or guide page.
public
getCurrentGuideId() : string|null
This method determines the guide associated with the current page, whether directly viewing a guide or a guide page. It ensures that the block content is relevant to the current context.
Return values
string|null —The guide ID if available, or NULL if the current page is not a guide or guide page.