<?php

declare(strict_types=1);

namespace Drupal\dc_core\Plugin\Block;

use Drupal\Core\Block\Attribute\Block;
use Drupal\Core\Block\BlockBase;
use Drupal\Core\StringTranslation\TranslatableMarkup;

#[Block(
  id: "copyright_block",
  admin_label: new TranslatableMarkup("Copyright Block"),
  category: new TranslatableMarkup("DC Core")
)]
final class CopyrightBlock extends BlockBase {

  /**
   * {@inheritdoc}
   */
  public function build(): array {
    $year = date('Y');
    $build = [
      '#markup' => "<p>&#169; Dan Chadwick {$year}</p>",
    ];

    return $build;
  }

}
