Change to attribute technique
This commit is contained in:
@@ -3,18 +3,18 @@
|
|||||||
namespace Drupal\archive_tree\Plugin\Block;
|
namespace Drupal\archive_tree\Plugin\Block;
|
||||||
|
|
||||||
use Drupal\Core\Block\BlockBase;
|
use Drupal\Core\Block\BlockBase;
|
||||||
|
use Drupal\Core\Block\Attribute\Block;
|
||||||
use Drupal\Core\Form\FormStateInterface;
|
use Drupal\Core\Form\FormStateInterface;
|
||||||
use Drupal\node\Entity\NodeType;
|
use Drupal\node\Entity\NodeType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides an 'Archive tree' block.
|
* Provides an 'Archive Tree' block.
|
||||||
*
|
|
||||||
* @Block(
|
|
||||||
* id = "archive_tree_block",
|
|
||||||
* admin_label = @Translation("Archive tree"),
|
|
||||||
* )
|
|
||||||
*/
|
*/
|
||||||
|
#[\Drupal\Core\Block\Annotation\Block(
|
||||||
|
id: "archive_tree_block",
|
||||||
|
admin_label: ["Archive tree"]
|
||||||
|
)]
|
||||||
|
|
||||||
class ArchiveTreeBlock extends BlockBase {
|
class ArchiveTreeBlock extends BlockBase {
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user