SettingsTrayFormAnnotationIsClassBlock.php

Same filename in other branches
  1. 8.9.x core/modules/settings_tray/tests/modules/settings_tray_test/src/Plugin/Block/SettingsTrayFormAnnotationIsClassBlock.php
  2. 10 core/modules/settings_tray/tests/modules/settings_tray_test/src/Plugin/Block/SettingsTrayFormAnnotationIsClassBlock.php
  3. 11.x core/modules/settings_tray/tests/modules/settings_tray_test/src/Plugin/Block/SettingsTrayFormAnnotationIsClassBlock.php

Namespace

Drupal\settings_tray_test\Plugin\Block

File

core/modules/settings_tray/tests/modules/settings_tray_test/src/Plugin/Block/SettingsTrayFormAnnotationIsClassBlock.php

View source
<?php

namespace Drupal\settings_tray_test\Plugin\Block;

use Drupal\Core\Block\BlockBase;

/**
 * Block that explicitly provides a "settings_tray" form class.
 *
 * @Block(
 *   id = "settings_tray_test_class",
 *   admin_label = "Settings Tray test block: forms[settings_tray]=class",
 *   forms = {
 *     "settings_tray" = "\Drupal\settings_tray_test\Form\SettingsTrayFormAnnotationIsClassBlockForm",
 *   },
 * )
 */
class SettingsTrayFormAnnotationIsClassBlock extends BlockBase {
    
    /**
     * {@inheritdoc}
     */
    public function build() {
        return [
            '#markup' => '<span>class</span>',
        ];
    }

}

Classes

Title Deprecated Summary
SettingsTrayFormAnnotationIsClassBlock Block that explicitly provides a "settings_tray" form class.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.