You are here

function social_simple_form_node_type_form_builder in Social simple 8

Same name and namespace in other branches
  1. 2.0.x social_simple.module \social_simple_form_node_type_form_builder()

Entity builder for the node type form with social simple share option.

See also

private_content_form_node_type_form_alter()

1 string reference to 'social_simple_form_node_type_form_builder'
social_simple_form_node_type_form_alter in ./social_simple.module
Implements hook_form_FORM_ID_alter().

File

./social_simple.module, line 200
Contains social.module..

Code

function social_simple_form_node_type_form_builder($entity_type, NodeTypeInterface $type, &$form, FormStateInterface $form_state) {
  $type
    ->setThirdPartySetting('social_simple', 'share', $form_state
    ->getValue('social_simple_share'));
  $type
    ->setThirdPartySetting('social_simple', 'networks', array_filter($form_state
    ->getValue('social_simple_networks')));
  $type
    ->setThirdPartySetting('social_simple', 'title', $form_state
    ->getValue('social_simple_title'));
  $type
    ->setThirdPartySetting('social_simple', 'hashtags', $form_state
    ->getValue('social_simple_hashtags'));
  $type
    ->setThirdPartySetting('social_simple', 'forward_integration', $form_state
    ->getValue('social_simple_forward_integration'));
}