Drupal 8 : Get a config settings value being stored in blocs 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-&gt;configuration['submit_action_amu_dud_form_block_settings'] = $form_state-&gt;getValue('submit_action_amu_dud_form_block_settings');

 }


in a method of the same class i can retrieve the value

      $config = $this-&gt;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(&amp;$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(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {

//$my_stored_value=??
You need to load the block if your outside of the class, for that you need it's id.

$block = \Drupal\block\Entity\Block::load($bid);
$my_stored_value = $block-&gt;get('settings')['submit_action_amu_dud_form_block_settings'];


The id can be found in it's annotation if it's custom: @Block( * id = "my_fancy_block_id". If there are several instances of the block this may be altered and can be looked up in the DB, or the block config admin section - check the urls there.