Skip to content

API reference

This is an automatically generated documentation for Helper.

Namespaces

\Drupal\Tests\helper\Traits

Traits

Trait Description
DatabaseColumnTrait Asserts the actual definition of database columns.
DrushCommandsTestTrait Helpers for calling Drush command methods directly in kernel tests.
FormFieldTrait Helpers for setting form field values in FunctionalJavascript tests.
HttpMockTrait Mocks the HTTP requests made in kernel tests.

\Drupal\helper

Classes

Class Description
AccessHelper Provides helpers for working with access results.
ArrayHelper Provides helper for working with arrays.
Config Provides helper for working with configuration.
CurrentEntity Provides helper for working with current entities.
EntityHelper Provides helpers for working with entities.
EntityType Provides helpers for working with entity types.
Field Provides helpers for working with field values.
File Provides helpers for working with files.
HelperServiceProvider Alters the service container to add Helper module compiler passes.
Html Provides helpers for working with HTML.
InstallProfile Helpers related to working with install profiles.
LayoutBuilder Provides helpers for working with Layout Builder.
MediaHelper Helpers for working with media entities.
Menu Provides helpers working with menus and menu links.
PathautoHelper Helpers for working with the Pathauto module.
Plugin Provides various utility helpers for plugins.
RenderElement Utility helpers for working with render elements.
TextFormat Helper service for modifying text formats.
Theme Helper service for working with themes.
Utility Provides various utility helpers.
ViewHelper Helpers for working with Views.

Traits

Trait Description
AccountSwitcherTrait Provides a helper to run code as another account.
EntityBrowserFormTrait Provides helpers for adding an entity browser element to a form.
LinkAutocompleteFormTrait Provides helpers for adding a content autocomplete link element to a form.
TrashHelperTrait Provides a helper to run code that should include trashed entities.

\Drupal\helper\Access

Classes

Class Description
IsMultilingualAccessCheck Checks access if the site has more than one language configured.

\Drupal\helper\Compiler

Classes

Class Description
ModuleDependencyPass Removes any services and aliases that have an unmet module dependency.

\Drupal\helper\Controller

Classes

Class Description
ToolbarController Toolbar controller.

\Drupal\helper\Drush\Commands

Classes

Class Description
CacheCommands Drush commands for clearing caches.
EntityCommands Provides entity commands.
InstallProfileCommands Drush commands for working with install profiles.
ModuleCommands Drush commands for working with module schemas.
SearchCommands Drush commands for core's Search module.

\Drupal\helper\Element

Classes

Class Description
EntitySelect Provides a element for a entity select menu.

\Drupal\helper\Entity

Classes

Class Description
ContentEntityUpdater A utility class to make updating content entities simple.

\Drupal\helper\EventSubscriber

Classes

Class Description
CacheableBinaryFileResponseSubscriber Makes file responses cacheable by reverse proxies and CDNs.
ConfigCacheTagInvalidator A subscriber for invalidating cache tags when a config object is saved.
NavigationCreateLinksSubscriber Rebuilds the menu links when the navigation_create_links helper changes.
NullEventSubscriber An event subscriber class that does nothing. Use for service overrides.
RedirectEntityEditSubscriber Redirect 4xx errors to the entity edit page if the user has access.

\Drupal\helper\Field

Classes

Class Description
CustomField A helper for changing Custom Field subfields that already have data.
StringField A helper for working with string fields.

\Drupal\helper\File

Classes

Class Description
ComposerFile Helper for working with Drupal's Composer file.
File Helper for reading and writing data files, with cached contents.
JsonFile Helper for working with JSON files.
YamlFile Helper for working with YAML files.

\Drupal\helper\Hook

Classes

Class Description
CustomFieldHooks Custom Field hook implementations for the Helper module.
EntityHooks Entity hooks for the Helper module.
HelperHooks Hook implementations for helper.
LayoutBuilderHooks Layout Builder hooks for the Helper module.
MediaHooks Media hooks for the Helper module.
NavigationHooks Navigation hooks for the Helper module.
ViewsHooks Views hook implementations for the Helper module.

\Drupal\helper\PageCache\ResponsePolicy

Classes

Class Description
DenyCacheableBinaryFileResponse Keeps cacheable file responses out of the Dynamic Page Cache.

\Drupal\helper\Plugin\Block

Classes

Class Description
ContextEntity Provides a block that renders the current entity.
NodeField Provides a block that renders a node field.

\Drupal\helper\Plugin\Field\FieldWidget

Classes

Class Description
TimestampDateWidget A date picker, without a time, for timestamp and created fields.

\Drupal\helper\Plugin\Mail

Classes

Class Description
LoggerMail Defines a mail backend that captures sent messages to the logger.

\Drupal\helper\Plugin\Validation\Constraint

Classes

Class Description
EntityFieldUniqueValues Checks if an entity field has duplicate values.
EntityFieldUniqueValuesValidator Validates duplicate entity field values.
FieldListUniqueValues Checks if a field has duplicate values.
FieldListUniqueValuesValidator Validates duplicate field values.

\Drupal\helper\Plugin\views\cache

Classes

Class Description
BundleTags Overrides the default cache tags for views to add bundle tags.

\Drupal\helper\Response

Classes

Class Description
CacheableBinaryFileResponse A file response that can be cached.
JsonEncodeResponse A JSON PSR-7 response implementation.
JsonFileResponse A JSON PSR-7 response implementation.

\Drupal\helper\Routing

Classes

Class Description
RouteSubscriber Route subscriber for the Helper module.

\Drupal\helper\Tests

Traits

Trait Description
AssertFileUsageTrait Provides assertions for file usage.
AssertQueueTrait Provides assertions for running queues.
RenderElementTestTrait Trait for helping test render elements.

\Drupal\helper\Twig

Classes

Class Description
HelperExtension Twig extension with some useful functions and filters.