protected function HoldTestSubscriber::hold in Drupal 9
Same name and namespace in other branches
- 8 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 60
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(static::WAIT));
}