Annotation for creating a block.

PHOTO EMBED

Tue Jan 04 2022 19:59:01 GMT+0000 (UTC)

Saved by @igor #drupal #php

/**
 * Provides My Config Block.
 *
 * @Block(
 *   id = "config_block",
 *   admin_label = @Translation("My Config Block"),
 *   category = @Translation("My Config Block"),
 * )
 */
content_copyCOPY

Ovo se piše iznad definicije klase (class MyConfigBlock extends BlockBase{...}).