I have create a block with a form and stored something i called 'submit_action_amu_dud_form_block_settings'
public function blockSubmit($form, FormStateInterface $form_state) {
$this->configuration['submit_action_amu_dud_form_block_settings'] = $form_state->getValue('submit_action_amu_dud_form_block_settings');
}
in a method of the same class i can retrieve the value
$config = $this->getConfiguration();
$my_stored value=$config['submit_action_amu_dud_form_block_settings']
how can i get it from . module hook_form_alter callback ?
function mymodule_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
if ($form_id == 'amu_dud_form') {
$form['actions']['submit']['#submit'][] = 'my_submit_method';
}
}
function my_submit_method(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
//$my_stored_value=??