<?php

/**
 * @file
 */

use Drupal\block\BlockInterface;

/**
 * Checks if a block has overrides.
 *
 * @param \Drupal\block\BlockInterface $block
 *   The block to check for overrides.
 *
 * @return bool
 *   TRUE if the block has overrides otherwise FALSE.
 *
 * @internal
 */
function _settings_tray_has_block_overrides(BlockInterface $block) {
  // @todo Replace the following with $block->hasOverrides() in https://www.drupal.org/project/drupal/issues/2910353
  //   and remove this function.
  return \Drupal::config($block->getEntityType()->getConfigPrefix() . '.' . $block->id())->hasOverrides();
}
