Classes, traits, and interfaces - main - drupal

Primary tabs

Introduction to classes

A lot of the PHP code in Drupal is object oriented (OO), making use of PHP classes, interfaces, and traits. See the Objected-oriented programming conventions for more information.

See also

Objected-oriented programming conventions

File

core/core.api.php, line 1529

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
YamlFileLoader class Drupal\Core\DependencyInjection core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php YamlFileLoader loads YAML files service definitions. 2
YamlFileLoaderTest class Drupal\Tests\Core\DependencyInjection core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php Tests Drupal\Core\DependencyInjection\YamlFileLoader.
YamlPecl class Drupal\Component\Serialization core/lib/Drupal/Component/Serialization/YamlPecl.php Provides default serialization for YAML using the PECL extension. 1
YamlPeclTest class Drupal\Tests\Component\Serialization core/tests/Drupal/Tests/Component/Serialization/YamlPeclTest.php Tests the YamlPecl serialization implementation.
YamlRouteDiscovery class Drupal\Core\Routing core/lib/Drupal/Core/Routing/YamlRouteDiscovery.php Reads routing.yml files provided by modules and creates route collections. 1 1 2
YamlTest class Drupal\Tests\Component\Serialization core/tests/Drupal/Tests/Component/Serialization/YamlTest.php Tests the Yaml serialization implementation.
YamlTestBase abstract class Drupal\Tests\Component\Serialization core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php Provides standard data to validate different YAML implementations. 2
YearDate class Drupal\views\Plugin\views\argument core/modules/views/src/Plugin/views/argument/YearDate.php Argument handler for a year (CCYY)
YearDate class Drupal\datetime\Plugin\views\argument core/modules/datetime/src/Plugin/views/argument/YearDate.php Argument handler for a year.
YearMonthDate class Drupal\datetime\Plugin\views\argument core/modules/datetime/src/Plugin/views/argument/YearMonthDate.php Argument handler for a year plus month (CCYYMM).
YearMonthDate class Drupal\views\Plugin\views\argument core/modules/views/src/Plugin/views/argument/YearMonthDate.php Argument handler for a year plus month (CCYYMM)
Zip class Drupal\system\Plugin\Archiver core/modules/system/src/Plugin/Archiver/Zip.php Defines an archiver implementation for .zip files.
Zip

in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement.

class Drupal\Core\Archiver core/lib/Drupal/Core/Archiver/Zip.php Defines an archiver implementation for .zip files. 1 2
ZipTest class Drupal\KernelTests\Core\Archiver core/tests/Drupal/KernelTests/Core/Archiver/ZipTest.php Tests Drupal\Core\Archiver\Zip.

Other projects


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