class Deprecated

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/element_info_test/src/Element/Deprecated.php \Drupal\element_info_test\Element\Deprecated
  2. 10 core/modules/system/tests/modules/element_info_test/src/Element/Deprecated.php \Drupal\element_info_test\Element\Deprecated

Provides deprecated render element for testing.

Attributes

#[RenderElement('deprecated')]

Hierarchy

Expanded class hierarchy of Deprecated

21 string references to 'Deprecated'
AnnotatedClassDiscoveryTest::provideBadAnnotations in core/tests/Drupal/Tests/Component/Plugin/Discovery/AnnotatedClassDiscoveryTest.php
All the Drupal documentation standards tags.
ban.info.yml in core/modules/ban/ban.info.yml
core/modules/ban/ban.info.yml
block_content_storage_body_field.info.yml in core/modules/block_content/modules/block_content_storage_body_field/block_content_storage_body_field.info.yml
core/modules/block_content/modules/block_content_storage_body_field/block_content_storage_body_field.info.yml
contact.info.yml in core/modules/contact/contact.info.yml
core/modules/contact/contact.info.yml
DeprecatedElementTest::testBuildInfo in core/tests/Drupal/KernelTests/Core/Render/Element/DeprecatedElementTest.php
Tests that render elements can trigger deprecations in their constructor.

... See full list

File

core/modules/system/tests/modules/element_info_test/src/Element/Deprecated.php, line 13

Namespace

Drupal\element_info_test\Element
View source
class Deprecated extends RenderElementBase {
  
  /**
   * {@inheritdoc}
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    @trigger_error(__CLASS__ . ' is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/3068104', E_USER_DEPRECATED);
  }
  
  /**
   * {@inheritdoc}
   */
  public function getInfo() {
    return [];
  }

}

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