function FileTestHelper::logCall
Store the values passed to a hook invocation.
Parameters
string $op: One of the hook_file_* operations: 'load', 'validate', 'download', 'insert', 'update', 'copy', 'move', 'delete'.
array $args: Values passed to hook.
See also
Drupal\file_test\FileTestHelper::getCalls()
Drupal\file_test\FileTestHelper::reset()
8 calls to FileTestHelper::logCall()
- FileTestHooks::fileCopy in core/
modules/ file/ tests/ file_test/ src/ Hook/ FileTestHooks.php - Implements hook_file_copy().
- FileTestHooks::fileDownload in core/
modules/ file/ tests/ file_test/ src/ Hook/ FileTestHooks.php - Implements hook_file_download().
- FileTestHooks::fileInsert in core/
modules/ file/ tests/ file_test/ src/ Hook/ FileTestHooks.php - Implements hook_ENTITY_TYPE_insert() for file entities.
- FileTestHooks::fileLoad in core/
modules/ file/ tests/ file_test/ src/ Hook/ FileTestHooks.php - Implements hook_ENTITY_TYPE_load() for file entities.
- FileTestHooks::fileMove in core/
modules/ file/ tests/ file_test/ src/ Hook/ FileTestHooks.php - Implements hook_file_move().
File
-
core/
modules/ file/ tests/ file_test/ src/ FileTestHelper.php, line 87
Class
- FileTestHelper
- Helper for file tests.
Namespace
Drupal\file_testCode
public static function logCall($op, $args) : void {
if (\Drupal::state()->get('file_test.count_hook_invocations', TRUE)) {
$results = \Drupal::state()->get('file_test.results', []);
$results[$op][] = $args;
\Drupal::state()->set('file_test.results', $results);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.