You are here

function entity_usage_update_8205 in Entity Usage 8.2

Same name and namespace in other branches
  1. 8.4 entity_usage.install \entity_usage_update_8205()
  2. 8.3 entity_usage.install \entity_usage_update_8205()

Initialize the new "usage_controller_items_per_page" config value to 25.

File

./entity_usage.install, line 382
Install, update and uninstall functions for entity_usage module.

Code

function entity_usage_update_8205(&$sandbox) {
  $config = \Drupal::configFactory()
    ->getEditable('entity_usage.settings');
  $items_per_page = $config
    ->get('usage_controller_items_per_page');
  if (empty($items_per_page)) {
    $config
      ->set('usage_controller_items_per_page', ListUsageController::ITEMS_PER_PAGE_DEFAULT)
      ->save(TRUE);
  }
}