function hackedProject::hash_local_project in Hacked! 8.2
Hash the local version of the project.
3 calls to hackedProject::hash_local_project()
- hackedProject::compute_differences in src/
hackedProject.php - Compute the differences between our version and the canonical version of the project.
- hackedProject::file_get_location in src/
hackedProject.php - hackedProject::file_is_diffable in src/
hackedProject.php
File
- src/
hackedProject.php, line 223
Class
- hackedProject
- Encapsulates a Hacked! project.
Namespace
Drupal\hackedCode
function hash_local_project() {
// Only do this once, no matter how many times we're called.
if (!empty($this->local_hashed)) {
return;
}
$location = $this
->locate_local_project();
$this->local_files = hackedFileGroup::fromList($location, $this->remote_files->files);
$this->local_files
->compute_hashes();
$this->local_hashed = !empty($this->local_files->files);
// Logging.
if (!$this->local_hashed) {
$message = $this
->t('Could not hash local project: @title', [
'@title' => $this
->title(),
]);
\Drupal::logger('hacked')
->error($message
->render());
}
}