European Week of Regions and Cities

Carousel extends BlockBase implements ContainerFactoryPluginInterface

Generates the Home Video Block.

Tags
Block

( id = "carousel_block", admin_label = @Translation("Carousel block"), category = @Translation("Custom"), )

Table of Contents

Interfaces

ContainerFactoryPluginInterface

Properties

$entityTypeManager  : EntityTypeManagerInterface
The entity type manager.
$fileUrlGenerator  : FileUrlGeneratorInterface
The file URL generator.

Methods

__construct()  : mixed
Constructs a new Carousel block.
build()  : mixed
{@inheritdoc}
create()  : mixed
{@inheritdoc}
getButton()  : array<string|int, mixed>
Constructs the slide button render array.
getNavigation()  : array<string|int, mixed>
Constructs the slide navigation render array.
getSlides()  : array<string|int, mixed>
Constructs the carousel render array.

Properties

$entityTypeManager

The entity type manager.

protected EntityTypeManagerInterface $entityTypeManager

$fileUrlGenerator

The file URL generator.

protected FileUrlGeneratorInterface $fileUrlGenerator

Methods

__construct()

Constructs a new Carousel block.

public __construct(array<string|int, mixed> $configuration, string $plugin_id, array<string|int, mixed> $plugin_definition, EntityTypeManagerInterface $entity_type_manager, FileUrlGeneratorInterface $file_url_generator) : mixed
Parameters
$configuration : array<string|int, mixed>

A configuration array containing information about the plugin instance.

$plugin_id : string

The plugin_id for the plugin instance.

$plugin_definition : array<string|int, mixed>

The plugin implementation definition.

$entity_type_manager : EntityTypeManagerInterface

The entity type manager service.

$file_url_generator : FileUrlGeneratorInterface

The file URL generator.

build()

{@inheritdoc}

public build() : mixed

create()

{@inheritdoc}

public static create(ContainerInterface $container, array<string|int, mixed> $configuration, mixed $plugin_id, mixed $plugin_definition) : mixed
Parameters
$container : ContainerInterface
$configuration : array<string|int, mixed>
$plugin_id : mixed
$plugin_definition : mixed

getButton()

Constructs the slide button render array.

protected getButton(mixed $link) : array<string|int, mixed>
Parameters
$link : mixed
Return values
array<string|int, mixed>

getNavigation()

Constructs the slide navigation render array.

protected getNavigation(mixed $total_slides) : array<string|int, mixed>
Parameters
$total_slides : mixed
Return values
array<string|int, mixed>

getSlides()

Constructs the carousel render array.

protected getSlides() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results