Search for ensure

  1. Search 7.x for ensure
  2. Search 9.5.x for ensure
  3. Search 10.3.x for ensure
  4. Search 11.x for ensure
  5. Other projects
Title Object type File name Summary
BatchStorage::ensureTableExists function core/lib/Drupal/Core/Batch/BatchStorage.php Check if the table exists and create it if not.
BrokenHandlerTrait::ensureMyTable function core/modules/views/src/Plugin/views/BrokenHandlerTrait.php Ensure the main table for this handler is in the query. This is used
a lot.
ClassLoaderTest::$apcuEnsureUniquePrefix property core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php The flag to set 'apcu_ensure_unique_prefix' setting.
Composer::ensureComposerVersion function composer/Composer.php Ensure that the minimum required version of Composer is running.
Throw an exception if Composer is too old.
Composer::ensureHtaccess function core/lib/Drupal/Core/Composer/Composer.php Ensures that .htaccess and web.config files are present in Composer root.
ComposerTest::testEnsureComposerVersion function core/tests/Drupal/Tests/Composer/ComposerTest.php Verify that Composer::ensureComposerVersion() doesn't break.
ComputedItemListTrait::ensureComputedValue function core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php Ensures that values are only computed once.
DatabaseBackend::ensureBinExists function core/lib/Drupal/Core/Cache/DatabaseBackend.php Check if the cache bin exists and create it if not.
DatabaseBackend::ensureTableExists function core/lib/Drupal/Core/Flood/DatabaseBackend.php Check if the flood table exists and create it if not.
DatabaseCacheTagsChecksum::ensureTableExists function core/lib/Drupal/Core/Cache/DatabaseCacheTagsChecksum.php Check if the cache tags table exists and create it if not.
DatabaseLockBackend::ensureTableExists function core/lib/Drupal/Core/Lock/DatabaseLockBackend.php Check if the semaphore table exists and create it if not.
DatabaseQueue::ensureTableExists function core/lib/Drupal/Core/Queue/DatabaseQueue.php Check if the table exists and create it if not.
DatabaseStorage::ensureTableExists function core/lib/Drupal/Core/Config/DatabaseStorage.php Check if the config table exists and create it if not.
DatabaseTestBase::ensureSampleDataNull function core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php Sets up tables for NULL handling.
EntityDisplayWithLayoutInterface::ensureLayout function core/modules/field_layout/src/Display/EntityDisplayWithLayoutInterface.php Ensures this entity has a layout.
EntityListBuilder::ensureDestination function core/lib/Drupal/Core/Entity/EntityListBuilder.php Ensures that a destination is present on the given URL.
FieldLayoutEntityDisplayTrait::ensureLayout function core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php
FileStorage::ensureDirectory function core/lib/Drupal/Component/PhpStorage/FileStorage.php Ensures the directory exists, has the right permissions, and a .htaccess.
FileStorage::ensureStorage function core/lib/Drupal/Core/Config/FileStorage.php Check if the directory exists and create it if not.
FileSystemTest::testEnsureFileExistsBeforeCopy function core/tests/Drupal/KernelTests/Core/File/FileSystemTest.php @covers ::copy
FileUpload::ensureFileUploadAccess function core/modules/jsonapi/src/Controller/FileUpload.php Ensures that the given account is allowed to upload a file.
file_ensure_htaccess function core/includes/file.inc Creates a .htaccess file in each Drupal files directory if it is missing.
FunctionalTestSetupTrait::$apcuEnsureUniquePrefix property core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php The flag to set 'apcu_ensure_unique_prefix' setting.
HandlerBase::ensureMyTable function core/modules/views/src/Plugin/views/HandlerBase.php Ensure the main table for this handler is in the query. This is used
a lot.
HtaccessWriter::ensure function core/lib/Drupal/Core/File/HtaccessWriter.php Creates a .htaccess file in each Drupal files directory if it is missing.
HtaccessWriterInterface::ensure function core/lib/Drupal/Core/File/HtaccessWriterInterface.php Creates a .htaccess file in each Drupal files directory if it is missing.
install_ensure_config_directory function core/includes/install.inc Ensures that the config directory exists and is writable, or can be made so.
ManageOptions::ensureLocations function composer/Plugin/Scaffold/ManageOptions.php Ensures that all of the locations defined in the scaffold files exist.
ManyToOne::ensureMyTable function core/modules/views/src/Plugin/views/filter/ManyToOne.php Override ensureMyTable so we can control how this joins in.
The operator actually has influence over joining.
ManyToOne::ensureMyTable function core/modules/views/src/Plugin/views/argument/ManyToOne.php Override ensureMyTable so we can control how this joins in.
The operator actually has influence over joining.
ManyToOneHelper::ensureMyTable function core/modules/views/src/ManyToOneHelper.php Override ensureMyTable so we can control how this joins in.
The operator actually has influence over joining.
MatcherDumper::ensureTableExists function core/lib/Drupal/Core/Routing/MatcherDumper.php Checks if the tree table exists and create it if not.
MenuTreeStorage::ensureTableExists function core/lib/Drupal/Core/Menu/MenuTreeStorage.php Checks if the tree table exists and create it if not.
MigrateSqlIdMapEnsureTablesTest class core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php Tests the SQL ID map plugin ensureTables() method.
MigrateSqlIdMapEnsureTablesTest.php file core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php
MigrateSqlIdMapEnsureTablesTest::$migrationConfiguration property core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php The migration configuration, initialized to set the ID and destination IDs.
MigrateSqlIdMapEnsureTablesTest::runEnsureTablesTest function core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php Actually run the test.
MigrateSqlIdMapEnsureTablesTest::testEnsureTablesExist function core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php Tests the ensureTables method when the tables exist.
MigrateSqlIdMapEnsureTablesTest::testEnsureTablesNotExist function core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php Tests the ensureTables method when the tables do not exist.
ModerationStateJoinViewsHandlerTrait::ensureMyTable function core/modules/content_moderation/src/Plugin/views/ModerationStateJoinViewsHandlerTrait.php
ModuleExtensionList::ensureRequiredDependencies function core/lib/Drupal/Core/Extension/ModuleExtensionList.php Marks dependencies of required modules as 'required', recursively.
NegotiatorBase::ensureVersionExists function core/modules/jsonapi/src/Revisions/NegotiatorBase.php Helper method that ensures that a version exists.
PagerSelectExtender::ensureElement function core/lib/Drupal/Core/Database/Query/PagerSelectExtender.php Ensure that there is an element associated with this query.
If an element was not specified previously, then the value of the
$maxElement counter is taken, after which the counter is incremented.
QueryTest::ensureTable function core/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php
Renderer::ensureMarkupIsSafe function core/lib/Drupal/Core/Render/Renderer.php Escapes #plain_text or filters #markup as required.
Schema::ensureIdentifiersLength function core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php Make sure to limit identifiers according to PostgreSQL compiled in length.
Schema::ensureNotNullPrimaryKey function core/lib/Drupal/Core/Database/Schema.php Ensures that all the primary key fields are correctly defined.
SelectionPluginBase::ensureBackwardCompatibilityConfiguration function core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginBase.php Ensures a backward compatibility level configuration.
Sql::ensurePath function core/modules/views/src/Plugin/views/query/Sql.php Make sure that the specified table can be properly linked to the primary
table in the JOINs. This function uses recursion. If the tables
needed to complete the path back to the primary table are not in the
query they will be added, but additional…
Sql::ensureTable function core/modules/views/src/Plugin/views/query/Sql.php Ensure a table exists in the queue; if it already exists it won't
do anything, but if it doesn't it will add the table queue. It will ensure
a path leads back to the relationship table.

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