Functions - 8.9.x - drupal
Title | Deprecated | File name | Summary | Direct uses | Strings |
---|---|---|---|---|---|
db_add_primary_key | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call addPrimaryKey() on it. For example, $injected_database->schema()->addPrimaryKey($table, $fields); |
core/ |
Adds a primary key to a database table. | 1 | |
db_add_unique_key | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call addUniqueKey() on it. For example, $injected_database->schema()->addUniqueKey($table, $name, $fields); |
core/ |
Adds a unique key. | 1 | |
db_and | in drupal:8.0.0 and is removed from drupal:9.0.0. Create a \Drupal\Core\Database\Query\Condition object, specifying an AND conjunction: new Condition('AND'); |
core/ |
Returns a new DatabaseCondition, set to "AND" all conditions together. | 1 | |
db_change_field | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call changeField() on it. For example, $injected_database->schema() ->changeField($table, $field, $field_new, $spec, $keys_new); |
core/ |
Changes a field definition. | 1 | |
db_close | in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Database\Database::closeConnection($target). |
core/ |
Closes the active database connection. | 1 | |
db_condition | in drupal:8.0.0 and is removed from drupal:9.0.0. Create a \Drupal\Core\Database\Query\Condition object, specifying the desired conjunction: new Condition($conjunction); |
core/ |
Returns a new DatabaseCondition, set to the specified conjunction. | 1 | |
db_create_table | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call createTable() on it. For example, $injected_database->schema()->createTable($name, $table); |
core/ |
Creates a new table from a Drupal table definition. | 1 | |
db_delete | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call delete() on it. For example, $injected_database->delete($table, $options); |
core/ |
Returns a new DeleteQuery object for the active database. | 1 | |
db_driver | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call driver() on it. For example, $injected_database->driver($string); |
core/ |
Retrieves the name of the currently active database driver. | 1 | |
db_drop_field | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call dropField() on it. For example, $injected_database->schema()->dropField($table, $field); |
core/ |
Drops a field. | 1 | |
db_drop_index | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call dropIndex() on it. For example, $injected_database->schema()->dropIndex($table, $name); |
core/ |
Drops an index. | 1 | |
db_drop_primary_key | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call dropPrimaryKey() on it. For example, $injected_database->schema()->dropPrimaryKey($table); |
core/ |
Drops the primary key of a database table. | 1 | |
db_drop_table | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call dropTable() on it. For example, $injected_database->schema()->dropTable($table); |
core/ |
Drops a table. | 1 | |
db_drop_unique_key | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call dropUniqueKey() on it. For example, $injected_database->schema()->dropUniqueKey($table, $name); |
core/ |
Drops a unique key. | 1 | |
db_escape_field | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call escapeField() on it. For example, $injected_database->escapeField($field); |
core/ |
Restricts a dynamic column or constraint name to safe characters. | 1 | |
db_escape_table | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call escapeTable() on it. For example, $injected_database->escapeTable($table); |
core/ |
Restricts a dynamic table name to safe characters. | 1 | |
db_field_exists | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call fieldExists() on it. For example, $injected_database->schema()->fieldExists($table, $field); |
core/ |
Checks if a column exists in the given table. | 1 | |
db_field_names | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call fieldNames() on it. For example, $injected_database->schema()->fieldNames($fields); |
core/ |
Returns an array of field names from an array of key/index column specifiers. | 1 | |
db_field_set_default | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call changeField() on it, passing a full field specification. For example, $injected_database->schema() ->changeField($table, $field, $field_new, $spec, $keys_new); |
core/ |
Sets the default value for a field. | 1 | |
db_field_set_no_default | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call changeField() on it, passing a full field specification. For example, $injected_database->schema() ->changeField($table, $field, $field_new, $spec, $keys_new); |
core/ |
Sets a field to have no default value. | 1 | |
db_find_tables | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call findTables() on it. For example, $injected_database->schema()->findTables($table_expression); |
core/ |
Finds all tables that are like the specified base table name. | 1 | |
db_ignore_replica | in drupal:8.7.0 and is removed from drupal:9.0.0. Use \Drupal::service('database.replica_kill_switch')->trigger() instead. |
core/ |
Sets a session variable specifying the lag time for ignoring a replica server (A replica server is traditionally referred to as a "slave" in database server documentation). | 1 | |
db_index_exists | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call indexExists() on it. For example, $injected_database->schema()->indexExists($table, $name); |
core/ |
Checks if an index exists in the given table. | 1 | |
db_insert | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call insert() on it. For example, $injected_database->insert($table, $options); |
core/ |
Returns a new InsertQuery object for the active database. | 1 | |
db_installer_object | core/ |
Returns a database installer object. | 2 | ||
db_like | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call escapeLike() on it. For example, $injected_database->escapeLike($string); |
core/ |
Escapes characters that work as wildcard characters in a LIKE pattern. | 1 | |
db_merge | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call merge() on it. For example, $injected_database->merge($table, $options); |
core/ |
Returns a new MergeQuery object for the active database. | 1 | |
db_next_id | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call nextId() on it. For example, $injected_database->nextId($existing_id); |
core/ |
Retrieves a unique id. | 1 | |
db_or | in drupal:8.0.0 and is removed from drupal:9.0.0. Create a \Drupal\Core\Database\Query\Condition object, specifying an OR conjunction: new Condition('OR'); |
core/ |
Returns a new DatabaseCondition, set to "OR" all conditions together. | 1 | |
db_query | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call query() on it. For example, $injected_database->query($query, $args, $options); |
core/ |
Executes an arbitrary query string against the active database. | 1 | 1 |
db_query_range | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call queryRange() on it. For example, $injected_database->queryRange($query, $from, $count, $args, $options); |
core/ |
Executes a query against the active database, restricted to a range. | 1 | |
db_query_temporary | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call queryTemporary() on it. For example, $injected_database->queryTemporary($query, $args, $options); |
core/ |
Executes a SELECT query string and saves the result set to a temporary table. | 1 | |
db_rename_table | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call renameTable() on it. For example, $injected_database->schema()->renameTable($table, $new_name); |
core/ |
Renames a table. | 1 | |
db_select | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call select() on it. For example, $injected_database->select($table, $alias, $options); |
core/ |
Returns a new SelectQuery object for the active database. | 1 | |
db_set_active | in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Database\Database::setActiveConnection(). |
core/ |
Sets a new active database. | 1 | |
db_table_exists | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call tableExists() on it. For example, $injected_database->schema()->tableExists($table); |
core/ |
Checks if a table exists. | 1 | |
db_transaction | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call startTransaction() on it. For example, $injected_database->startTransaction($name); |
core/ |
Returns a new transaction object for the active database. | 1 | |
db_truncate | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call truncate() on it. For example, $injected_database->truncate($table, $options); |
core/ |
Returns a new TruncateQuery object for the active database. | 1 | |
db_update | in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call update() on it. For example, $injected_database->update($table, $options); |
core/ |
Returns a new UpdateQuery object for the active database. | 1 | |
db_xor | in drupal:8.0.0 and is removed from drupal:9.0.0. Create a \Drupal\Core\Database\Query\Condition object, specifying a XOR conjunction: new Condition('XOR'); |
core/ |
Returns a new DatabaseCondition, set to "XOR" all conditions together. | 1 | |
debug | core/ |
Outputs debug information. | 8 | 17 | |
delay_cache_tags_invalidation_entity_test_insert | core/ |
Implements hook_ENTITY_TYPE_insert(). | |||
delay_cache_tags_invalidation_user_insert | core/ |
Implements hook_ENTITY_TYPE_insert(). | |||
demo_umami_content_install | core/ |
Implements hook_install(). | |||
demo_umami_content_uninstall | core/ |
Implements hook_uninstall(). | |||
demo_umami_form_install_configure_form_alter | core/ |
Implements hook_form_FORM_ID_alter() for install_configure_form(). | |||
demo_umami_form_install_configure_submit | core/ |
Submission handler to sync the contact.form.feedback recipient. | 1 | ||
demo_umami_install | core/ |
Implements hook_install(). | |||
demo_umami_requirements | core/ |
Implements hook_requirements(). | |||
demo_umami_set_users_passwords | core/ |
Sets the password of admin to be the password for all users. | 1 |
Pagination
- Previous page
- Page 10
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.