function FileTestHooks::getReturn
Load the appropriate return value.
Parameters
string $op: One of the hook_file_[validate,download] operations.
Return value
array|int|null Value set by Drupal\file_test\FileTestHelper::setReturn().
See also
\Drupal\file_test\FileTestHelper::setReturn()
Drupal\file_test\FileTestHelper::reset()
1 call to FileTestHooks::getReturn()
- FileTestHooks::fileDownload in core/
modules/ file/ tests/ file_test/ src/ Hook/ FileTestHooks.php - Implements hook_file_download().
File
-
core/
modules/ file/ tests/ file_test/ src/ Hook/ FileTestHooks.php, line 192
Class
- FileTestHooks
- Hook implementations for file_test.
Namespace
Drupal\file_test\HookCode
public function getReturn($op) : array|int|null {
$return = \Drupal::keyValue('file_test')->get('return', [
$op => NULL,
]);
return $return[$op];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.