getDefaultToolkit(); if ($toolkit) { $plugin_definition = $toolkit->getPluginDefinition(); $requirements = [ 'image.toolkit' => [ 'title' => t('Image toolkit'), 'value' => $toolkit->getPluginId(), 'description' => $plugin_definition['title'], ], ]; foreach ($toolkit->getRequirements() as $key => $requirement) { $namespaced_key = 'image.toolkit.' . $toolkit->getPluginId() . '.' . $key; $requirements[$namespaced_key] = $requirement; } } else { $requirements = [ 'image.toolkit' => [ 'title' => t('Image toolkit'), 'value' => t('None'), 'description' => t("No image toolkit is configured on the site. Check PHP installed extensions or add a contributed toolkit that doesn't require a PHP extension. Make sure that at least one valid image toolkit is enabled."), 'severity' => REQUIREMENT_ERROR, ], ]; } return $requirements; } /** * Flush caches as we changed field formatter metadata. */ function image_update_8201() { // Empty update to trigger a cache flush. // Use hook_post_update_NAME() instead to clear the cache. The use of // hook_update_N() to clear the cache has been deprecated see // https://www.drupal.org/node/2960601 for more details. }