public static function Bootstrap::deprecated in Express 8
Logs and displays a warning about a deprecated function/method being used.
26 calls to Bootstrap::deprecated()
- bootstrap_cdn_provider in themes/
contrib/ bootstrap/ deprecated.php - Retrieves a list of available CDN providers for the Bootstrap framework.
- bootstrap_element_smart_description in themes/
contrib/ bootstrap/ deprecated.php - Converts an element description into a tooltip based on certain criteria.
- bootstrap_get_cdn_assets in themes/
contrib/ bootstrap/ deprecated.php - Retrieves CDN assets for the active provider, if any.
- bootstrap_get_theme_info in themes/
contrib/ bootstrap/ deprecated.php - Return information from the .info file of a theme (and possible base themes).
- bootstrap_include in themes/
contrib/ bootstrap/ deprecated.php - Includes a file from a theme.
File
- themes/
contrib/ bootstrap/ src/ Bootstrap.php, line 407 - Contains \Drupal\bootstrap\Bootstrap.
Class
- Bootstrap
- The primary class for the Drupal Bootstrap base theme.
Namespace
Drupal\bootstrapCode
public static function deprecated() {
// Log backtrace.
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
\Drupal::logger('bootstrap')
->warning('<pre><code>' . print_r($backtrace, TRUE) . '</code></pre>');
if (!self::getTheme()
->getSetting('suppress_deprecated_warnings')) {
return;
}
// Extrapolate the caller.
$caller = $backtrace[1];
$class = '';
if (isset($caller['class'])) {
$parts = explode('\\', $caller['class']);
$class = array_pop($parts) . '::';
}
drupal_set_message(t('The following function(s) or method(s) have been deprecated, please check the logs for a more detailed backtrace on where these are being invoked. Click on the function or method link to search the documentation site for a possible replacement or solution.'), 'warning');
drupal_set_message(t('<a href=":url" target="_blank">@title</a>.', [
':url' => self::apiSearchUrl($class . $caller['function']),
'@title' => ($class ? $caller['class'] . $caller['type'] : '') . $caller['function'] . '()',
]), 'warning');
}