elgg_get_plugin_from_id(string $plugin_id)
Elgg plugins library Contains functions for managing plugins.
addFailures(int $num=1)
Increment failure count.
run(Result $result, $offset)
Runs upgrade on a single batch of items.If countItems() returns Batch::UNKNOWN_COUNT, this method must call $result->markCompleted() when the upgrade is complete.Result of the batch (this must be returned) Number to skip when processingResult
Remove the notifications plugin entity.
addSuccesses(int $num=1)
Set an item (or items) as successfully upgraded.
shouldBeSkipped()
Should this upgrade be skipped?If true, the upgrade will not be performed and cannot be accessed late...
Result of a single BatchUpgrade run.
getVersion()
Version of the upgrade.This tells the date when the upgrade was added. It consists of eight digits an...
System upgrades are executed synchronously at system upgrade.
_elgg_services()
Get the global service provider.
countItems()
The total number of items to process during the upgrade.If unknown, Batch::UNKNOWN_COUNT should be re...
needsIncrementOffset()
Should the run() method receive an offset representing all processed items?If true, run() will receive as $offset the number of items already processed. This is useful if you are only modifying data, and need to use the $offset in a function like elgg_get_entities*() to know how many to skip over.If false, run() will receive as $offset the total number of failures. This should be used if your process deletes or moves data out of the way of the process. E.g. if you delete 50 objects on each run(), you may still use the $offset to skip objects that already failed once.bool