Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Command.php
Show All 23 Lines | abstract class Command extends \Illuminate\Console\Command | ||||
* * deletion of objects and their relations rely on database foreign keys with obscure cascading, | * * deletion of objects and their relations rely on database foreign keys with obscure cascading, | ||||
* | * | ||||
* * a command will result in the permanent, irrecoverable loss of data. | * * a command will result in the permanent, irrecoverable loss of data. | ||||
* | * | ||||
* @var boolean | * @var boolean | ||||
*/ | */ | ||||
protected $dangerous = false; | protected $dangerous = false; | ||||
/** | |||||
* Shortcut to creating a progress bar of a particular format with a particular message. | |||||
* | |||||
* @param int $count Number of progress steps | |||||
* @param string $message The description | |||||
* | |||||
* @return \Symfony\Component\Console\Helper\ProgressBar | |||||
*/ | |||||
protected function createProgressBar($count, $message = null) | |||||
{ | |||||
$bar = $this->output->createProgressBar($count); | |||||
$bar->setFormat( | |||||
'%current:7s%/%max:7s% [%bar%] %percent:3s%% %elapsed:7s%/%estimated:-7s% %message% ' | |||||
); | |||||
if ($message) { | |||||
$bar->setMessage("{$message}..."); | |||||
} | |||||
$bar->start(); | |||||
return $bar; | |||||
} | |||||
/** | /** | ||||
* Find the domain. | * Find the domain. | ||||
* | * | ||||
* @param string $domain Domain ID or namespace | * @param string $domain Domain ID or namespace | ||||
* @param bool $withDeleted Include deleted | * @param bool $withDeleted Include deleted | ||||
* | * | ||||
* @return \App\Domain|null | * @return \App\Domain|null | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines |