You are here

public static function RenderCache::containerReady in Render cache 7.2

Container Ready event listener.

Parameters

$container: The service container.

File

lib/RenderCache.php, line 83
Contains RenderCache

Class

RenderCache
Static Service Container wrapper wrapping Drupal class.

Code

public static function containerReady($container) {
  static::$container = $container;

  // Last get the render stack for improved performance.
  if (static::$container) {
    static::$renderStack = static::$container
      ->get('render_stack');

    // Check if we support dynamic asset loading via drupal_add_js/css.
    if (variable_get('render_cache_supports_dynamic_assets', FALSE)) {
      static::$renderStack
        ->supportsDynamicAssets(TRUE);
    }
  }
}