|
Elgg
Version master
|
Abstract seed. More...
Public Member Functions | |
| __construct (array $options=[]) | |
| Seed constructor. More... | |
| getCount () | |
| Get the count of the seeded entities. More... | |
| advance (int $step=1) | |
| Advance progressbar. More... | |
| seed () | |
| Populate database. More... | |
| unseed () | |
| Removed seeded rows from database. More... | |
Public Member Functions inherited from Elgg\Database\Seeds\Seedable | |
| createUser (array $properties=[]) | |
| Create a new fake user. More... | |
| createGroup (array $properties=[]) | |
| Create a new fake group. More... | |
| createObject (array $properties=[]) | |
| Create a new fake object. More... | |
| createSite (array $properties=[]) | |
| Create a new fake site. More... | |
Static Public Member Functions | |
| static | register (\Elgg\Event $event) |
| Register this class for seeding. More... | |
| static | getDefaultLimit () |
| Get the default number of content to seed. More... | |
| static | getType () |
| Get the (un)seeding type of this handler. More... | |
Protected Member Functions | |
| getCountOptions () | |
| Get options for elgg_count_entities() More... | |
Protected Attributes | |
| int | $limit |
| bool | $create = false |
| int | $seeded_counter = 0 |
Abstract seed.
Plugins should extend this class to create their own seeders, add use 'seeds','database' event to add their seed to the sequence.
| Elgg\Database\Seeds\Seed::__construct | ( | array | $options = [] | ) |
| Elgg\Database\Seeds\Seed::advance | ( | int | $step = 1 | ) |
|
final |
|
abstractprotected |
Get options for elgg_count_entities()
Reimplemented in Elgg\Database\Seeds\Users, and Elgg\Database\Seeds\Groups.
|
static |
|
staticabstract |
Get the (un)seeding type of this handler.
Reimplemented in Elgg\Database\Seeds\Users, and Elgg\Database\Seeds\Groups.
|
staticfinal |
|
abstract |
Populate database.
Reimplemented in Elgg\Database\Seeds\Users, and Elgg\Database\Seeds\Groups.
|
abstract |
Removed seeded rows from database.
Reimplemented in Elgg\Database\Seeds\Users, and Elgg\Database\Seeds\Groups.