uber_publisher_in_pictures-7.0.0/uber_publisher_in_pictures.install
uber_publisher_in_pictures.install
<?php
/**
* @file
* Install functions for the uber_publisher_in_pictures module.
*/
/**
* Implements hook_install().
*/
function uber_publisher_in_pictures_install() {
$config_factory = \Drupal::configFactory();
$moduleHandler = \Drupal::service('module_handler');
if ($moduleHandler->moduleExists('uber_publisher_social_post')) {
$config_factory->getEditable('core.entity_form_display.node.in_pictures.default')->set('content.field_post_to_twitter',
[
'type' => 'boolean_checkbox',
'weight' => '11',
'region' => 'content',
'settings' => ['display_label' => 'true'],
'third_party_settings' => [],
])->save();
}
$config = $config_factory->getEditable('workflows.workflow.varbase_editorial_workflow');
$config_array = $config->get();
$config_array['type_settings']['entity_types']['node'][] = 'in_pictures';
$config->set('type_settings', $config_array['type_settings']);
$config->save();
}
