18 advance as
private progressAdvance;
50 $this->limit = static::getDefaultLimit();
66 $seeds = $event->getValue();
68 $seeds[] = static::class;
84 'metadata_names' =>
'__faker',
99 $this->seeded_counter +=
$step;
101 $this->progressAdvance(
$step);
118 abstract public function seed();
125 abstract public function unseed();
132 abstract public static function getType(): string;
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
trait Seeding
Seeding trait Can be used to easily create new random users, groups and objects in the database...
getCountOptions()
Get options for elgg_count_entities()
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special the source code distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place counts as distribution of the source even though third parties are not compelled to copy the source along with the object code You may not or distribute the Program except as expressly provided under this License Any attempt otherwise to sublicense or distribute the Program is void
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
setCreateUntil($until= 'now')
Set a time for entities to be created until.
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options
trait Progressing
Progress reporting.
advance(int $step=1)
Advance progressbar.
static getDefaultLimit()
Get the default number of content to seed.
elgg_count_entities(array $options=[])
Returns a count of entities.
Provides seedable methods for database seeding and unit tests.
static getType()
Get the (un)seeding type of this handler.
__construct(array $options=[])
Seed constructor.
setCreateSince($since= 'now')
Set a time for entities to be created after.
unseed()
Removed seeded rows from database.
getCount()
Get the count of the seeded entities.
Models an event passed to event handlers.