function social_verify_custom_requirements in Open Social 10.0.x
Same name and namespace in other branches
- 8.9 social.profile \social_verify_custom_requirements()
- 8 social.profile \social_verify_custom_requirements()
- 8.2 social.profile \social_verify_custom_requirements()
- 8.3 social.profile \social_verify_custom_requirements()
- 8.4 social.profile \social_verify_custom_requirements()
- 8.5 social.profile \social_verify_custom_requirements()
- 8.6 social.profile \social_verify_custom_requirements()
- 8.7 social.profile \social_verify_custom_requirements()
- 8.8 social.profile \social_verify_custom_requirements()
- 10.3.x social.profile \social_verify_custom_requirements()
- 10.1.x social.profile \social_verify_custom_requirements()
- 10.2.x social.profile \social_verify_custom_requirements()
Callback for install_verify_requirements, so that we meet custom requirement.
Parameters
array $install_state: The current install state.
Return value
array All the requirements we need to meet.
1 string reference to 'social_verify_custom_requirements'
- social_install_tasks_alter in ./
social.profile - Implements hook_install_tasks_alter().
File
- ./
social.profile, line 70 - Enables modules and site configuration for a social site installation.
Code
function social_verify_custom_requirements(array &$install_state) {
// Copy pasted from install_verify_requirements().
// @todo when composer hits remove this.
// Check the installation requirements for Drupal and this profile.
$requirements = install_check_requirements($install_state);
// Verify existence of all required modules.
$requirements += drupal_verify_profile($install_state);
// Added a custom check for users to see if the Address libraries are
// downloaded.
if (!class_exists('\\CommerceGuys\\Addressing\\Address')) {
$requirements['addressing_library'] = [
'title' => t('Address module requirements)'),
'value' => t('Not installed'),
'description' => t('The Address module requires the commerceguys/addressing library. <a href=":link" target="_blank">For more information check our readme</a>', [
':link' => 'https://www.drupal.org/docs/8/distributions/open-social/installing-and-updating',
]),
'severity' => REQUIREMENT_ERROR,
];
}
return install_display_requirements($install_state, $requirements);
}