18 foreach ($seeders as $seed) {
19 $types[] = $seed::getType();
22 $this->setName(
'database:unseed')
23 ->setDescription(
elgg_echo(
'cli:database:unseed:description'))
24 ->addOption(
'type',
't', InputOption::VALUE_OPTIONAL,
34 if (!class_exists(
'\Faker\Generator')) {
35 elgg_log(
elgg_echo(
'cli:database:seed:log:error:faker'), \Psr\Log\LogLevel::ERROR);
44 'type' => $this->
option(
'type'),
49 }
catch (\Exception $e) {
50 elgg_log($e->getMessage(), \Psr\Log\LogLevel::ERROR);
51 return $e->getCode() ?: 3;
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options
elgg_log($message, $level=\Psr\Log\LogLevel::NOTICE)
Log a message.
Abstract command with some utility methods.
_elgg_services()
Get the global service provider.
option($name)
Returns option value.