function farm_form_update_manager_update_form_alter in farmOS 2.x
Same name and namespace in other branches
- 7 farm.profile \farm_form_update_manager_update_form_alter()
Implements hook_form_BASE_FORM_ID_alter().
File
- ./
farm.profile, line 67 - General functions for the farmOS installation profile.
Code
function farm_form_update_manager_update_form_alter(&$form, &$form_state, $form_id) {
// Disable updating through the UI.
// @see https://www.drupal.org/project/farm/issues/3136140
$message = t('Performing updates through this interface is disabled by farmOS. To update modules, use a packaged release of farmOS to ensure that any necessary patches are applied to dependencies.');
\Drupal::messenger()
->addError($message);
$form['actions']['#access'] = FALSE;
}