function HoldTestSubscriber::hold
Same name in other branches
- 9 core/modules/system/tests/modules/hold_test/src/EventSubscriber/HoldTestSubscriber.php \Drupal\hold_test\EventSubscriber\HoldTestSubscriber::hold()
- 10 core/modules/system/tests/modules/hold_test/src/EventSubscriber/HoldTestSubscriber.php \Drupal\hold_test\EventSubscriber\HoldTestSubscriber::hold()
- 11.x core/modules/system/tests/modules/hold_test/src/EventSubscriber/HoldTestSubscriber.php \Drupal\hold_test\EventSubscriber\HoldTestSubscriber::hold()
Hold process by type.
Parameters
string $type: Type of hold.
2 calls to HoldTestSubscriber::hold()
- HoldTestSubscriber::onRequest in core/
modules/ system/ tests/ modules/ hold_test/ src/ EventSubscriber/ HoldTestSubscriber.php - Request hold.
- HoldTestSubscriber::onRespond in core/
modules/ system/ tests/ modules/ hold_test/ src/ EventSubscriber/ HoldTestSubscriber.php - Response hold.
File
-
core/
modules/ system/ tests/ modules/ hold_test/ src/ EventSubscriber/ HoldTestSubscriber.php, line 53
Class
- HoldTestSubscriber
- Response subscriber to test hold.
Namespace
Drupal\hold_test\EventSubscriberCode
protected function hold($type) {
$path = "{$this->sitePath}/hold_test_{$type}.txt";
do {
$status = (bool) file_get_contents($path);
} while ($status && NULL === usleep(100000));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.