function CurrentImport::createFromArray
Creates a CurrentImport from an array.
Parameters
array $result: The array containing the primer information.
Return value
self The CurrentImport object.
1 call to CurrentImport::createFromArray()
- CurrentImportStorage::get in core/
modules/ locale/ src/ CurrentImportStorage.php - Get current import information for a given project and language.
File
-
core/
modules/ locale/ src/ CurrentImport.php, line 76
Class
- CurrentImport
- Represents information about the current import status.
Namespace
Drupal\localeCode
public static function createFromArray(array $result) : self {
$currentImport = new CurrentImport($result['project'], $result['langcode'], $result['version'], $result['hash'], $result['timestamp'], $result['last_checked'] ?? NULL);
return $currentImport;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.