comment_user_predelete

comment_user_predelete($account) Implements hook_ENTITY_TYPE_predelete() for user entities. File core/modules/comment/comment.module, line 543 Enables users to comment on published content. Code function comment_user_predelete($account) { $entity_query = \Drupal::entityQuery('comment'); $entity_query->condition('uid', $account->id()); $cids = $entity_query->execute(); entity_delete_multiple('comment', $cids); }

EntityDefinitionUpdateManager::installEntityType

public EntityDefinitionUpdateManager::installEntityType(EntityTypeInterface $entity_type) Installs a new entity type definition. Parameters \Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition. Overrides EntityDefinitionUpdateManagerInterface::installEntityType File core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php, line 133 Class EntityDefinitionUpdateManager Manages entity definition updates. Namespace Drupal\Core\Entity Code public function i

hook_file_move

hook_file_move(Drupal\file\FileInterface $file, Drupal\file\FileInterface $source) Respond to a file that has been moved. Parameters \Drupal\file\FileInterface $file: The updated file entity after the move. \Drupal\file\FileInterface $source: The original file entity before the move. See also file_move() Related topics Hooks Define functions that alter the behavior of Drupal core. File core/modules/file/file.api.php, line 70 Hooks for file module. Code function hook_file_move(Drupal\file\

ArgumentsResolver::$scalars

An associative array of parameter names to scalar candidate values. Type: array File core/lib/Drupal/Component/Utility/ArgumentsResolver.php, line 15 Class ArgumentsResolver Resolves the arguments to pass to a callable. Namespace Drupal\Component\Utility Code protected $scalars;

StatementInterface::setFetchMode

public StatementInterface::setFetchMode($mode, $a1 = NULL, $a2 = array()) Sets the default fetch mode for this statement. See http://php.net/manual/pdo.constants.php for the definition of the constants used. Parameters $mode: One of the PDO::FETCH_* constants. $a1: An option depending of the fetch mode specified by $mode: for PDO::FETCH_COLUMN, the index of the column to fetch for PDO::FETCH_CLASS, the name of the class to create for PDO::FETCH_INTO, the object to add the data to $a2: If $mo

SqlContentEntityStorageSchema::addIndex

protected SqlContentEntityStorageSchema::addIndex($table, $name, array $specifier, array $schema) Creates an index, dropping it if already existing. Parameters string $table: The table name. string $name: The index name. array $specifier: The fields to index. array $schema: The table specification. See also \Drupal\Core\Database\Schema::addIndex() File core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php, line 1998 Class SqlContentEntityStorageSchema Defines a schema handler

ActiveTheme::$extension

The extension object. Type: \Drupal\Core\Extension\Extension File core/lib/Drupal/Core/Theme/ActiveTheme.php, line 55 Class ActiveTheme Defines a theme and its information needed at runtime. Namespace Drupal\Core\Theme Code protected $extension;

ListElement::getTranslationBuild

public ListElement::getTranslationBuild(LanguageInterface $source_language, LanguageInterface $translation_language, $source_config, $translation_config, array $parents, $base_key = NULL) Builds a render array containg the source and translation form elements. Parameters \Drupal\Core\Language\LanguageInterface $source_language: The source language of the configuration object. \Drupal\Core\Language\LanguageInterface $translation_language: The language to display the translation form for. mixed

LanguageAddForm::validateCustom

public LanguageAddForm::validateCustom(array $form, FormStateInterface $form_state) Validates the language addition form on custom language button. File core/modules/language/src/Form/LanguageAddForm.php, line 110 Class LanguageAddForm Controller for language addition forms. Namespace Drupal\language\Form Code public function validateCustom(array $form, FormStateInterface $form_state) { if ($form_state->getValue('predefined_langcode') == 'custom') { $langcode = $form_state->

FileStorageInterface::spaceUsed

public FileStorageInterface::spaceUsed($uid = NULL, $status = FILE_STATUS_PERMANENT) Determines total disk space used by a single user or the whole filesystem. Parameters int $uid: Optional. A user id, specifying NULL returns the total space used by all non-temporary files. int $status: (Optional) The file status to consider. The default is to only consider files in status FILE_STATUS_PERMANENT. Return value int An integer containing the number of bytes used. File core/modules/file/src/FileSt