function CurrentImport::createFromSource

Creates a CurrentImport from a source object.

Parameters

object $source: The source object containing the primer information.

Return value

self The CurrentImport object.

3 calls to CurrentImport::createFromSource()
LocaleSource::sourceBuild in core/modules/locale/src/LocaleSource.php
Builds abstract translation source.
locale_translation_status_save in core/modules/locale/locale.module
Saves the status of translation sources in static cache.
locale_translation_update_file_history in core/modules/locale/locale.module
Updates the {locale_file} table.

File

core/modules/locale/src/CurrentImport.php, line 62

Class

CurrentImport
Represents information about the current import status.

Namespace

Drupal\locale

Code

public static function createFromSource(object $source) : self {
  $currentImport = new CurrentImport($source->project, $source->langcode, $source->version, $source->hash, $source->timestamp, $source->last_checked ?? NULL);
  return $currentImport;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.