Classes, traits, and interfaces - 9.5.x - 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 1523

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
FilterHtmlCorrector class Drupal\filter\Plugin\Filter core/modules/filter/src/Plugin/Filter/FilterHtmlCorrector.php Provides a filter to correct faulty and chopped off HTML.
FilterHtmlEscape class Drupal\filter\Plugin\Filter core/modules/filter/src/Plugin/Filter/FilterHtmlEscape.php Provides a filter to display any HTML as plain text.
FilterHtmlImageSecure class Drupal\filter\Plugin\Filter core/modules/filter/src/Plugin/Filter/FilterHtmlImageSecure.php Provides a filter to restrict images to site.
FilterHtmlImageSecureTest class Drupal\Tests\filter\Functional core/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php Tests restriction of IMG tags in HTML input.
FilterHtmlTest class Drupal\Tests\filter\Unit core/modules/filter/tests/src/Unit/FilterHtmlTest.php @coversDefaultClass \Drupal\filter\Plugin\Filter\FilterHtml @group filter
FilterHtmlTest class Drupal\Tests\filter\FunctionalJavascript core/modules/filter/tests/src/FunctionalJavascript/FilterHtmlTest.php Tests the 'filter_html' plugin javascript functionality.
FilterID class Drupal\filter\Plugin\migrate\process core/modules/filter/src/Plugin/migrate/process/FilterID.php Plugin annotation @MigrateProcessPlugin( id = "filter_id" ) 1
FilterIdTest class Drupal\Tests\filter\Kernel\Plugin\migrate\process core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterIdTest.php Unit tests of the filter_id plugin.
FilterInOperatorTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php Tests the core Drupal\views\Plugin\views\filter\InOperator handler.
FilterInterface interface Drupal\filter\Plugin core/modules/filter/src/Plugin/FilterInterface.php Defines the interface for text processing filter plugins. 1 16
FilterInterface interface Drupal\Core\Routing core/lib/Drupal/Core/Routing/FilterInterface.php A route filter service to filter down the collection of route instances. 5 2
FilterIsIncompatible class Drupal\ckeditor5_incompatible_filter_test\Plugin\Filter core/modules/ckeditor5/tests/modules/ckeditor5_incompatible_filter_test/src/Plugin/Filter/FilterIsIncompatible.php Provides a filter incompatible with CKEditor 5.
FilterKernelTest class Drupal\Tests\filter\Kernel core/modules/filter/tests/src/Kernel/FilterKernelTest.php Tests Filter module filters individually.
FilterLanguageTest class Drupal\Tests\language\Kernel\Views core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php Tests the filter language handler.
FilterNodeAccessTest class Drupal\Tests\node\Functional\Views core/modules/node/tests/src/Functional/Views/FilterNodeAccessTest.php Tests the node_access filter handler.
FilterNoFormatTest class Drupal\Tests\filter\Kernel core/modules/filter/tests/src/Kernel/FilterNoFormatTest.php Tests the behavior of check_markup() when it is called without text format.
FilterNull class Drupal\filter\Plugin\Filter core/modules/filter/src/Plugin/Filter/FilterNull.php Provides a fallback placeholder filter to use for missing filters. 1
FilterNumericTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php Tests the numeric filter handler.
FilterNumericWebTest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php Tests the numeric filter UI.
FilterOptionsTest class Drupal\Tests\views_ui\FunctionalJavascript core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php Tests the JavaScript filtering of options in add handler form.
FilterPermissions class Drupal\filter core/modules/filter/src/FilterPermissions.php Provides dynamic permissions of the filter module.
FilterPermissionUiTest class Drupal\Tests\user\Functional\Views core/modules/user/tests/src/Functional/Views/FilterPermissionUiTest.php Tests the permission field handler ui.
FilterPlaceholderTextTest class Drupal\Tests\views\Functional\Handler core/modules/views/tests/src/Functional/Handler/FilterPlaceholderTextTest.php Tests the placeholder text on the appropriate filter handlers.
FilterPluginBase abstract class Drupal\views\Plugin\views\filter core/modules/views/src/Plugin/views/filter/FilterPluginBase.php Base class for Views filters handler plugins. 19 10
FilterPluginBaseStub class Drupal\Tests\views\Unit\Plugin\filter core/modules/views/tests/src/Unit/Plugin/filter/FilterPluginBaseTest.php
FilterPluginBaseTest class Drupal\Tests\views\Unit\Plugin\filter core/modules/views/tests/src/Unit/Plugin/filter/FilterPluginBaseTest.php @coversDefaultClass \Drupal\views\Plugin\views\filter\FilterPluginBase @group views
FilterPluginCollection class Drupal\filter core/modules/filter/src/FilterPluginCollection.php A collection of filters. 6
FilterPluginManager class Drupal\filter core/modules/filter/src/FilterPluginManager.php Manages text processing filters. 2 2
FilterProcessResult class Drupal\filter core/modules/filter/src/FilterProcessResult.php Used to return values from a text filter plugin's processing method. 24
FilterSecurityTest class Drupal\Tests\filter\Functional core/modules/filter/tests/src/Functional/FilterSecurityTest.php Tests HTML filtering with missing or skipped filters or text formats.
FilterSettings class Drupal\filter\Plugin\migrate\process core/modules/filter/src/Plugin/migrate/process/FilterSettings.php Adds the default allowed attributes to filter_html's allowed_html setting. 1
FilterSettingsTest class Drupal\Tests\filter\Kernel\Plugin\migrate\process core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterSettingsTest.php Unit tests of the filter_settings plugin.
FilterSparkles class Drupal\filter_test_plugin\Plugin\Filter core/modules/filter/tests/filter_test_plugin/src/Plugin/Filter/FilterSparkles.php Provides a filter to limit allowed HTML tags.
FilterStringTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php Tests the core Drupal\views\Plugin\views\filter\StringFilter handler.
FilterTest class Drupal\Tests\views\FunctionalJavascript\Plugin\views\Handler core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FilterTest.php Tests the add filter handler UI.
FilterTest class Drupal\Tests\views\Functional\Plugin core/modules/views/tests/src/Functional/Plugin/FilterTest.php Tests general filter plugin functionality.
FilterTest class Drupal\Tests\jsonapi\Kernel\Query core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php @coversDefaultClass \Drupal\jsonapi\Query\Filter @group jsonapi @group jsonapi_query
FilterTest class Drupal\views_test_data\Plugin\views\filter core/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterTest.php Plugin annotation @ViewsFilter("test_filter"); 2
FilterTestAssets class Drupal\filter_test\Plugin\Filter core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestAssets.php Provides a test filter to attach assets.
FilterTestCacheContexts class Drupal\filter_test\Plugin\Filter core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestCacheContexts.php Provides a test filter to associate cache contexts.
FilterTestCacheMerge class Drupal\filter_test\Plugin\Filter core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestCacheMerge.php Provides a test filter to merge with CacheableMetadata.
FilterTestCacheTags class Drupal\filter_test\Plugin\Filter core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestCacheTags.php Provides a test filter to associate cache tags.
FilterTestFormatForm class Drupal\filter_test\Form core/modules/filter/tests/filter_test/src/Form/FilterTestFormatForm.php Shows a test form for testing the 'text_format' form element. 1
FilterTestPlaceholders class Drupal\filter_test\Plugin\Filter core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestPlaceholders.php Provides a test filter to use placeholders.
FilterTestReplace class Drupal\filter_test\Plugin\Filter core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestReplace.php Provides a test filter to replace all content.
FilterTestRestrictTagsAndAttributes class Drupal\filter_test\Plugin\Filter core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestRestrictTagsAndAttributes.php Provides a test filter to restrict HTML tags and attributes.
FilterTestStatic class Drupal\filter_test_plugin\Plugin\Filter core/modules/filter/tests/filter_test_plugin/src/Plugin/Filter/FilterTestStatic.php Provides a filter that returns the same static text.
FilterUidRevisionTest class Drupal\Tests\node\Kernel\Views core/modules/node/tests/src/Kernel/Views/FilterUidRevisionTest.php Tests the node_uid_revision handler.
FilterUITest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/FilterUITest.php Tests for the filters from the UI.
FilterUninstallValidator class Drupal\filter\ProxyClass core/modules/filter/src/ProxyClass/FilterUninstallValidator.php Provides a proxy class for \Drupal\filter\FilterUninstallValidator.

Other projects


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