public function HashSaltRequirement::verify in Acquia Content Hub 8
Verifies the requirement.
Return value
int The requirement status code:
- REQUIREMENT_INFO: For info only.
- REQUIREMENT_OK: The requirement is satisfied.
- REQUIREMENT_WARNING: The requirement failed with a warning.
- REQUIREMENT_ERROR: The requirement failed with an error.
Overrides ContentHubRequirementBase::verify
File
- acquia_contenthub_diagnostic/
src/ Plugin/ ContentHubRequirement/ HashSaltRequirement.php, line 21
Class
- HashSaltRequirement
- Defines a salt hash requirement.
Namespace
Drupal\acquia_contenthub_diagnostic\Plugin\ContentHubRequirementCode
public function verify() {
if (strlen(Settings::get('hash_salt'))) {
return REQUIREMENT_OK;
}
$this
->setValue($this
->t('Not set'));
$this
->setDescription($this
->t('The <code>hash_salt</code> setting is not configured in settings.php.'));
return REQUIREMENT_ERROR;
}