Elgg  Version master
Public Member Functions | Protected Member Functions | List of all members
Elgg\Upgrades\MigrateAdminValidationNotificationPreference Class Reference
Inheritance diagram for Elgg\Upgrades\MigrateAdminValidationNotificationPreference:
Elgg\Upgrade\AsynchronousUpgrade Elgg\Upgrade\Batch

Public Member Functions

 getVersion ()
 {Version of the upgrade.This tells the date when the upgrade was added. It consists of eight digits and is in format yyyymmddnn where:
  • yyyy is the year
  • mm is the month (with leading zero)
  • dd is the day (with leading zero)
  • nn is an incrementing number (starting from 00) that is used in case two separate upgrades have been added during the same day
Returns
int E.g. 2016123101
} More...
 
 shouldBeSkipped ()
 {Should this upgrade be skipped?If true, the upgrade will not be performed and cannot be accessed later.
Returns
bool
} More...
 
 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.
Returns
bool
} More...
 
 countItems ()
 {The total number of items to process during the upgrade.If unknown, Batch::UNKNOWN_COUNT should be returned, and run() must manually mark the result as complete.
Returns
int
} More...
 
 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.
Parameters
Result$resultResult of the batch (this must be returned)
int$offsetNumber to skip when processing
Returns
Result
} More...
 
- Public Member Functions inherited from Elgg\Upgrade\Batch
 __construct (protected ?\ElggUpgrade $upgrade=null)
 Constructs a upgrade batch. More...
 
 getUpgrade ()
 Returns the related upgrade entity. More...
 

Protected Member Functions

 getOptions (array $options=[])
 Get the options to fetch orphaned comments. More...
 

Additional Inherited Members

- Public Attributes inherited from Elgg\Upgrade\Batch
const UNKNOWN_COUNT = -1
 countItems() should return this if it doesn't know how many items remain. More...
 

Detailed Description

Definition at line 8 of file MigrateAdminValidationNotificationPreference.php.

Member Function Documentation

◆ countItems()

Elgg\Upgrades\MigrateAdminValidationNotificationPreference::countItems ( )

{The total number of items to process during the upgrade.If unknown, Batch::UNKNOWN_COUNT should be returned, and run() must manually mark the result as complete.

Returns
int
}

Reimplemented from Elgg\Upgrade\Batch.

Definition at line 34 of file MigrateAdminValidationNotificationPreference.php.

◆ getOptions()

Elgg\Upgrades\MigrateAdminValidationNotificationPreference::getOptions ( array  $options = [])
protected

Get the options to fetch orphaned comments.

Parameters
array$optionsadditional options
Returns
array
See also
elgg_get_entities()

Definition at line 74 of file MigrateAdminValidationNotificationPreference.php.

◆ getVersion()

Elgg\Upgrades\MigrateAdminValidationNotificationPreference::getVersion ( )

{Version of the upgrade.This tells the date when the upgrade was added. It consists of eight digits and is in format yyyymmddnn where:

  • yyyy is the year
  • mm is the month (with leading zero)
  • dd is the day (with leading zero)
  • nn is an incrementing number (starting from 00) that is used in case two separate upgrades have been added during the same day
Returns
int E.g. 2016123101
}

Reimplemented from Elgg\Upgrade\Batch.

Definition at line 13 of file MigrateAdminValidationNotificationPreference.php.

◆ needsIncrementOffset()

Elgg\Upgrades\MigrateAdminValidationNotificationPreference::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.

Returns
bool
}

Reimplemented from Elgg\Upgrade\Batch.

Definition at line 27 of file MigrateAdminValidationNotificationPreference.php.

◆ run()

Elgg\Upgrades\MigrateAdminValidationNotificationPreference::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.

Parameters
Result$resultResult of the batch (this must be returned)
int$offsetNumber to skip when processing
Returns
Result
}

Reimplemented from Elgg\Upgrade\Batch.

Definition at line 41 of file MigrateAdminValidationNotificationPreference.php.

◆ shouldBeSkipped()

Elgg\Upgrades\MigrateAdminValidationNotificationPreference::shouldBeSkipped ( )

{Should this upgrade be skipped?If true, the upgrade will not be performed and cannot be accessed later.

Returns
bool
}

Reimplemented from Elgg\Upgrade\Batch.

Definition at line 20 of file MigrateAdminValidationNotificationPreference.php.


The documentation for this class was generated from the following file: