You are here

function acquia_contenthub_form_node_type_form_submit in Acquia Content Hub 8

Submit handler for the node type form with acquia contenthub options.

See also

acquia_contenthub_form_node_type_form_alter()

1 string reference to 'acquia_contenthub_form_node_type_form_submit'
acquia_contenthub_form_node_type_form_alter in ./acquia_contenthub.module
Implements hook_form_FORM_ID_alter().

File

./acquia_contenthub.module, line 191
Contains acquia_contenthub.module.

Code

function acquia_contenthub_form_node_type_form_submit(array $form, FormStateInterface &$form_state) {
  $node_type = $form_state
    ->getFormObject()
    ->getEntity()
    ->id();
  $settings = $form_state
    ->getValue('acquia_contenthub');
  \Drupal::service('acquia_contenthub.form.node_type_preview_image_form')
    ->saveSettings($node_type, $settings);
}