function AttributeBase::get
Same name in other branches
- 10 core/lib/Drupal/Component/Plugin/Attribute/AttributeBase.php \Drupal\Component\Plugin\Attribute\AttributeBase::get()
Overrides AttributeInterface::get
2 calls to AttributeBase::get()
- Layout::get in core/
lib/ Drupal/ Core/ Layout/ Attribute/ Layout.php - TestAttribute::get in core/
tests/ Drupal/ Tests/ Component/ Plugin/ Discovery/ AttributeBridgeDecoratorTest.php
6 methods override AttributeBase::get()
- CKEditor5AspectsOfCKEditor5Plugin::get in core/
modules/ ckeditor5/ src/ Attribute/ CKEditor5AspectsOfCKEditor5Plugin.php - CKEditor5Plugin::get in core/
modules/ ckeditor5/ src/ Attribute/ CKEditor5Plugin.php - Layout::get in core/
lib/ Drupal/ Core/ Layout/ Attribute/ Layout.php - PluginID::get in core/
lib/ Drupal/ Component/ Plugin/ Attribute/ PluginID.php - SectionStorage::get in core/
modules/ layout_builder/ src/ Attribute/ SectionStorage.php
File
-
core/
lib/ Drupal/ Component/ Plugin/ Attribute/ AttributeBase.php, line 68
Class
- AttributeBase
- Provides a base class for classed attributes.
Namespace
Drupal\Component\Plugin\AttributeCode
public function get() : array|object {
return array_filter(get_object_vars($this) + [
'class' => $this->getClass(),
'provider' => $this->getProvider(),
], function ($value, $key) {
return !($value === NULL && ($key === 'deriver' || $key === 'provider'));
}, ARRAY_FILTER_USE_BOTH);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.