function RenderElementBase::setType

Set type on initialize.

There is no need to either call or override this method.

@internal

1 call to RenderElementBase::setType()
RenderElementBase::initializeInternalStorage in core/lib/Drupal/Core/Render/Element/RenderElementBase.php
Initialize storage.
1 method overrides RenderElementBase::setType()
Generic::setType in core/lib/Drupal/Core/Render/Element/Generic.php
Set type on initialize.

File

core/lib/Drupal/Core/Render/Element/RenderElementBase.php, line 573

Class

RenderElementBase
Provides a base class for render element plugins.

Namespace

Drupal\Core\Render\Element

Code

protected function setType() : void {
  $this->storage['#type'] = $this->getPluginId();
}

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