Commit 9109d289 authored by renatog's avatar renatog Committed by renatog
Browse files

Issue #3271419 by RenatoG: Create a hook update to set the items per page to...

Issue #3271419 by RenatoG: Create a hook update to set the items per page to 50 by default on sites that is updating to the new version and config/install with the settings to new installs
parent bd644f00
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -200,3 +200,21 @@ function block_class_update_20008() {
  $config->save();

}

/**
 * Implements hook_update_N().
 *
 * Set the items per page in the block class list pagination to 50 by default.
 */
function block_class_update_20009() {

  // Get the config object.
  $config = \Drupal::configFactory()->getEditable('block_class.settings');

  // Set the items_per_page = 50 by default.
  $config->set('items_per_page', 50);

  // Save.
  $config->save();

}
+1 −0
Original line number Diff line number Diff line
@@ -7,4 +7,5 @@ enable_attributes: true
field_type_attributes: 'textarea'
maxlength_block_class_field: 255
maxlength_attributes: FALSE
items_per_page: 50
filter_html_clean_css_identifier: FALSE
 No newline at end of file