You are here

146 calls to Drupal::getContainer() in Drupal 10

BigPipeTestController::test in core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php
Returns all BigPipe placeholder test case render arrays.
BlockUiTest::testBlockPlacementIndicator in core/modules/block/tests/src/Functional/BlockUiTest.php
Tests the block placement indicator.
Cache::getBins in core/lib/Drupal/Core/Cache/Cache.php
Gets all cache bin services.
CKEditor5::validateConfigurationForm in core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php
CKEditor5::validatePair in core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php
Validates a Text Editor + Text Format pair.
ckeditor5_library_info_alter in core/modules/ckeditor5/ckeditor5.module
Implements hook_library_info_alter().
comment_test_comment_links_alter in core/modules/comment/tests/modules/comment_test/comment_test.module
Implements hook_comment_links_alter().
ConfigInstallTest::installModules in core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
Installs a module.
ConfigOtherModuleTest::installModule in core/modules/config/tests/src/Functional/ConfigOtherModuleTest.php
Installs a module.
ConfigOtherModuleTest::uninstallModule in core/modules/config/tests/src/Functional/ConfigOtherModuleTest.php
Uninstalls a module.
ConfigurableLanguageManagerTest::setUp in core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php
ConfigurableLanguageManagerTest::testUrlContentTranslationWithPreferredAdminLanguage in core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php
Tests translation with URL and Preferred Admin Language negotiators.
ConfigurableLanguageManagerTest::testUrlContentTranslationWithSessionLanguage in core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php
Tests translation with URL and Session Language Negotiators.
ConfigurableLanguageManagerTest::testUserProfileTranslationWithPreferredAdminLanguage in core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php
Tests translation of the user profile edit form.
ConstraintFactory::createInstance in core/lib/Drupal/Core/Validation/ConstraintFactory.php
Creates a pre-configured instance of a plugin.
ContainerDerivativeDiscoveryDecorator::getDeriver in core/lib/Drupal/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecorator.php
Gets a deriver for a base plugin.
ContainerFactory::createInstance in core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php
Creates a pre-configured instance of a plugin.
ContentEntityBaseUnitTest::testTypedData in core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php
Tests each condition in EntityBase::getTypedData().
ContentLanguageSettingsUnitTest::testLoadByEntityTypeBundle in core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php
@covers ::loadByEntityTypeBundle
ContentNegotiationRoutingTest::testContentRouting in core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php
Tests the content negotiation aspect of routing.
ContentNegotiationRoutingTest::testFullNegotiation in core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php
Full negotiation by header only.
ContentTranslationLocalTasksTest::setUp in core/modules/content_translation/tests/src/Unit/Menu/ContentTranslationLocalTasksTest.php
ControllerBase::container in core/lib/Drupal/Core/Controller/ControllerBase.php
Returns the service container.
CronQueueTest::setUp in core/modules/system/tests/src/Kernel/System/CronQueueTest.php
CronTest::setUp in core/tests/Drupal/Tests/Core/CronTest.php
DependencySerializationTrait::__wakeup in core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php
DisplayPageTest::testPageResponses in core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php
Checks the behavior of the page for access denied/not found behaviors.
Drupal::accessManager in core/lib/Drupal.php
Returns the access manager service.
Drupal::cache in core/lib/Drupal.php
Returns the requested cache bin.
Drupal::classResolver in core/lib/Drupal.php
Retrieves the class resolver.
Drupal::config in core/lib/Drupal.php
Retrieves a configuration object.
Drupal::configFactory in core/lib/Drupal.php
Retrieves the configuration factory.
Drupal::csrfToken in core/lib/Drupal.php
Returns the CSRF token manager service.
Drupal::currentUser in core/lib/Drupal.php
Gets the current active user.
Drupal::database in core/lib/Drupal.php
Returns the current primary database.
Drupal::destination in core/lib/Drupal.php
Returns the redirect destination helper.
Drupal::entityDefinitionUpdateManager in core/lib/Drupal.php
Returns the entity definition update manager.
Drupal::entityTypeManager in core/lib/Drupal.php
Retrieves the entity type manager.
Drupal::flood in core/lib/Drupal.php
Returns the flood instance.
Drupal::formBuilder in core/lib/Drupal.php
Returns the form builder service.
Drupal::hasRequest in core/lib/Drupal.php
Indicates if there is a currently active request object.
Drupal::hasService in core/lib/Drupal.php
Indicates if a service is defined in the container.
Drupal::httpClient in core/lib/Drupal.php
Returns the default http client.
Drupal::installProfile in core/lib/Drupal.php
Gets the active install profile.
Drupal::isConfigSyncing in core/lib/Drupal.php
Gets the syncing state.
Drupal::keyValue in core/lib/Drupal.php
Returns a key/value storage collection.
Drupal::keyValueExpirable in core/lib/Drupal.php
Returns an expirable key value store collection.
Drupal::languageManager in core/lib/Drupal.php
Returns the language manager service.
Drupal::linkGenerator in core/lib/Drupal.php
Returns the link generator service.
Drupal::lock in core/lib/Drupal.php
Returns the locking layer instance.
Drupal::logger in core/lib/Drupal.php
Returns a channel logger object.
Drupal::menuTree in core/lib/Drupal.php
Returns the menu tree.
Drupal::messenger in core/lib/Drupal.php
Returns the messenger.
Drupal::moduleHandler in core/lib/Drupal.php
Returns the module handler.
Drupal::pathValidator in core/lib/Drupal.php
Returns the path validator.
Drupal::queue in core/lib/Drupal.php
Returns a queue for the given queue name.
Drupal::request in core/lib/Drupal.php
Retrieves the currently active request object.
Drupal::requestStack in core/lib/Drupal.php
Retrieves the request stack.
Drupal::root in core/lib/Drupal.php
Gets the app root.
Drupal::routeMatch in core/lib/Drupal.php
Retrieves the currently active route match object.
Drupal::service in core/lib/Drupal.php
Retrieves a service from the container.
Drupal::state in core/lib/Drupal.php
Returns the state storage service.
Drupal::theme in core/lib/Drupal.php
Gets the theme service.
Drupal::time in core/lib/Drupal.php
Returns the time service.
Drupal::token in core/lib/Drupal.php
Returns the token service.
Drupal::translation in core/lib/Drupal.php
Returns the string translation service.
Drupal::transliteration in core/lib/Drupal.php
Returns the transliteration service.
Drupal::typedDataManager in core/lib/Drupal.php
Returns the typed data manager service.
Drupal::urlGenerator in core/lib/Drupal.php
Returns the url generator service.
DrupalTest::testGetContainerException in core/tests/Drupal/Tests/Core/DrupalTest.php
@covers ::getContainer
DrupalTest::testSetContainer in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the get/setContainer() method.
drupal_rewrite_settings in core/includes/install.inc
Replaces values in settings.php with values in the submitted array.
DummyReadOnlyStreamWrapper::getDirectoryPath in core/modules/file/tests/file_test/src/StreamWrapper/DummyReadOnlyStreamWrapper.php
Gets the path that the wrapper is responsible for.
DummyStreamWrapper::getDirectoryPath in core/modules/file/tests/file_test/src/StreamWrapper/DummyStreamWrapper.php
Gets the path that the wrapper is responsible for.
EntityKernelTestBase::refreshServices in core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php
Refresh services.
EntityQueryTest::testSort in core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
Tests sort().
EntityQueryTest::testTableSort in core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
Tests tablesort().
EntityTypeInfo::bundleFormRedirect in core/modules/content_moderation/src/EntityTypeInfo.php
Redirect content entity edit forms on save, if there is a pending revision.
EntityUnitTest::testCreate in core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
@covers ::create
EntityUnitTest::testLoad in core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
@covers ::load
EntityUnitTest::testLoadMultiple in core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
@covers ::loadMultiple
ExceptionHandlingTest::doTest404Route in core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
Sets the given path to use as the 404 page and triggers a 404.
ExceptionHandlingTest::test405 in core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
Tests on a route with a non-supported HTTP method.
ExceptionHandlingTest::testBacktraceEscaping in core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
Tests if exception backtraces are properly escaped when output to HTML.
ExceptionHandlingTest::testExceptionEscaping in core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
Tests exception message escaping.
ExceptionHandlingTest::testHtml403 in core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
Tests the exception handling for HTML and 403 status code.
ExceptionHandlingTest::testHtml404 in core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
Tests the exception handling for HTML and 404 status code.
ExceptionHandlingTest::testJson403 in core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
Tests the exception handling for json and 403 status code.
ExceptionHandlingTest::testJson404 in core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
Tests the exception handling for json and 404 status code.
ExtensionDiscovery::scan in core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
Discovers available extensions of a given type.
FieldCrudTest::testFieldPropertyConstraints in core/modules/field/tests/src/Kernel/FieldCrudTest.php
Tests setting and adding property constraints to a configurable field.
FieldPluginBaseTest::setUpUrlIntegrationServices in core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php
Sets up the unrouted url assembler and the link generator.
field_ui_local_tasks_alter in core/modules/field_ui/field_ui.module
Implements hook_local_tasks_alter().
FormatterPluginManager::createInstance in core/lib/Drupal/Core/Field/FormatterPluginManager.php
Creates a pre-configured instance of a plugin.
FormBase::container in core/lib/Drupal/Core/Form/FormBase.php
Returns the service container.
FunctionalTestSetupTrait::installModulesFromClassProperty in core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
Install modules defined by `static::$modules`.
FunctionalTestSetupTrait::resetAll in core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
Resets all data structures after having enabled new modules.
hold_test_request in core/modules/system/tests/modules/hold_test/hold_test.module
Request hold.
hold_test_response in core/modules/system/tests/modules/hold_test/hold_test.module
Response hold.
hook_comment_links_alter in core/modules/comment/comment.api.php
Alter the links of a comment.
hook_node_links_alter in core/modules/node/node.api.php
Alter the links of a node.
install_check_requirements in core/includes/install.core.inc
Checks installation requirements and reports any errors.
install_check_translations in core/includes/install.core.inc
Checks installation requirements and reports any errors.
KernelTestBaseTest::testRegister in core/tests/Drupal/KernelTests/KernelTestBaseTest.php
@covers ::register
locale_install in core/modules/locale/locale.install
Implements hook_install().
MigratePluginManager::createInstance in core/modules/migrate/src/Plugin/MigratePluginManager.php
Creates a pre-configured instance of a migration plugin.
MigrationPluginManager::createStubMigration in core/modules/migrate/src/Plugin/MigrationPluginManager.php
Creates a stub migration plugin from a definition array.
ModuleInstaller::install in core/lib/Drupal/Core/Extension/ModuleInstaller.php
ModuleInstaller::uninstall in core/lib/Drupal/Core/Extension/ModuleInstaller.php
ModulesListFormWebTest::testInstalledIncompatibleModule in core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php
Tests that incompatible modules message is shown.
ModulesListFormWebTest::testModulesListFormWithInvalidInfoFile in core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php
Tests the module form with a module with an invalid info.yml file.
new_dependency_test_update_8001 in core/modules/system/tests/modules/new_dependency_test/new_dependency_test.install
Enable the new_dependency_test_with_service module.
NodeOwnerTest::testOwner in core/modules/node/tests/src/Kernel/NodeOwnerTest.php
Tests node owner functionality.
NodeTypeTest::testNodeTypeDeletion in core/modules/node/tests/src/Functional/NodeTypeTest.php
Tests deleting a content type that still has content.
PageRenderTest::assertPageRenderHookExceptions in core/modules/system/tests/src/Kernel/Common/PageRenderTest.php
Asserts whether expected exceptions are thrown for invalid hook implementations.
PathHooksTest::testPathHooks in core/modules/path_alias/tests/src/Kernel/PathHooksTest.php
Tests that the PathAlias entity clears caches correctly.
PublicStream::basePath in core/lib/Drupal/Core/StreamWrapper/PublicStream.php
Returns the base path for public://.
RedirectResponseSubscriberTest::testDestinationRedirect in core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php
Tests destination detection and redirection.
RedirectResponseSubscriberTest::testDestinationRedirectToExternalUrl in core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php
@dataProvider providerTestDestinationRedirectToExternalUrl
RedirectResponseSubscriberTest::testDestinationRedirectWithInvalidUrl in core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php
@dataProvider providerTestDestinationRedirectWithInvalidUrl
RedirectResponseSubscriberTest::testRedirectWithOptInExternalUrl in core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php
@covers ::checkRedirectUrl
RegistryTest::test40xThemeSuggestions in core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
Tests page theme suggestions for 40x responses.
RendererBubblingTest::testBubblingWithPrerender in core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
Tests bubbling of bubbleable metadata added by #pre_render callbacks.
ResponsiveImageStyleConfigEntityUnitTest::testCalculateDependencies in core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php
@covers ::calculateDependencies
RouteProvider::lazyLoadItself in core/tests/Drupal/KernelTests/RouteProvider.php
Loads the real route provider from the container and rebuilds the router.
SelectPagerDefaultTest::testElementNumbers in core/modules/system/tests/src/Functional/Database/SelectPagerDefaultTest.php
Confirms that every pager gets a valid, non-overlapping element ID.
SqlTest::setupEntityTypeManager in core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php
Sets up the entity type manager in the container.
SqlTest::setupViewsData in core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php
Sets up the views data in the container.
system_requirements in core/modules/system/system.install
Implements hook_requirements().
TableSortExtenderTest::testTableSortInit in core/tests/Drupal/KernelTests/Core/Render/Element/TableSortExtenderTest.php
Tests \Drupal\Core\Utility\TableSort::getContextFromRequest().
Tasks::getFormOptions in core/modules/sqlite/src/Driver/Database/sqlite/Install/Tasks.php
Returns driver specific configuration options.
TempStoreDatabaseTest::testSharedTempStore in core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
Tests the SharedTempStore API.
ThemeUiTest::testInstalledIncompatibleTheme in core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php
Tests that incompatible themes message is shown.
ToolbarCacheContextsTest::installExtraModules in core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php
Installs a given list of modules and rebuilds the cache.
TwigEnvironmentTest::testCacheFilename in core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
Ensures that cacheFilename() varies by extensions + deployment identifier.
UpdatePathTestBase::setUp in core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php
Overrides BrowserTestBase::setUp() for update testing.
UpdatePathTestBaseTest::testModuleListChange in core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php
Tests that test running environment is updated when module list changes.
UpdateScriptTest::testExtensionCompatibilityChange in core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
Tests that extension compatibility changes are handled correctly.
UpdateScriptTest::testMissingExtension in core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
Tests that a missing extension prevents updates.
update_authorize_batch_copy_project in core/modules/update/update.authorize.inc
Implements callback_batch_operation().
update_manager_local_transfers_allowed in core/modules/update/update.manager.inc
Determines if file transfers will be performed locally.
views_invalidate_cache in core/modules/views/views.module
Invalidate the views cache, forcing a rebuild on the next grab of table data.
views_local_tasks_alter in core/modules/views/views.module
Implements hook_local_tasks_alter().
WidgetPluginManager::createInstance in core/lib/Drupal/Core/Field/WidgetPluginManager.php
Creates a pre-configured instance of a plugin.
WorkspaceTestTrait::initializeWorkspacesModule in core/modules/workspaces/tests/src/Kernel/WorkspaceTestTrait.php
Enables the Workspaces module and creates two workspaces.
_filter_url in core/modules/filter/filter.module
Converts text into hyperlinks automatically.