‪TYPO3CMS  10.4
SleepTask.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 
26 {
32  public ‪$sleepTime = 10;
33 
40  public function ‪execute()
41  {
42  $time = 10;
43  if (!empty($this->sleepTime)) {
44  $time = ‪$this->sleepTime;
45  }
46  sleep($time);
47  return true;
48  }
49 
55  public function ‪getAdditionalInformation()
56  {
57  return $this->‪getLanguageService()->‪sL('LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.sleepTime') . ': ' . ‪$this->sleepTime;
58  }
59 }
‪TYPO3\CMS\Scheduler\Example
Definition: SleepTask.php:16
‪TYPO3\CMS\Scheduler\Example\SleepTask\getAdditionalInformation
‪string getAdditionalInformation()
Definition: SleepTask.php:54
‪TYPO3\CMS\Core\Localization\LanguageService\sL
‪string sL($input)
Definition: LanguageService.php:194
‪TYPO3\CMS\Scheduler\Task\AbstractTask\getLanguageService
‪LanguageService null getLanguageService()
Definition: AbstractTask.php:605
‪TYPO3\CMS\Scheduler\Example\SleepTask
Definition: SleepTask.php:26
‪TYPO3\CMS\Scheduler\Task\AbstractTask
Definition: AbstractTask.php:35
‪TYPO3\CMS\Scheduler\Example\SleepTask\execute
‪bool execute()
Definition: SleepTask.php:39
‪TYPO3\CMS\Scheduler\Example\SleepTask\$sleepTime
‪int $sleepTime
Definition: SleepTask.php:31