Attribute fixes

This commit is contained in:
2026-01-24 10:21:39 -06:00
parent d48b6c826b
commit efd0d76f9b

View File

@@ -4,16 +4,18 @@ namespace Drupal\archive_tree\Plugin\Block;
use Drupal\Core\Block\BlockBase;
use Drupal\Core\Block\Attribute\Block;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Form\FormStateInterface;
use Drupal\node\Entity\NodeType;
/**
* Provides an 'Archive Tree' block.
* Provides an 'Archive tree' block.
*/
#[\Drupal\Core\Block\Annotation\Block(
#[Block(
id: "archive_tree_block",
admin_label: ["Archive tree"]
admin_label: new TranslatableMarkup("Archive tree"),
category: new TranslatableMarkup("Menus")
)]
class ArchiveTreeBlock extends BlockBase {
@@ -23,6 +25,7 @@ class ArchiveTreeBlock extends BlockBase {
public function defaultConfiguration() {
return [
// Todo: query for all content types.
'expand_years' => FALSE,
'content_types' => ['article'],
] + parent::defaultConfiguration();