3 namespace Drupal\blazy_test;
5 use Drupal\blazy\BlazyFormatterManager;
8 * Implements GridStackFormatterInterface.
10 class BlazyFormatterTest extends BlazyFormatterManager implements BlazyFormatterTestInterface {
13 * Gets the thumbnail image using theme_image_style().
15 * @param array $settings
16 * The array containing: thumbnail_style, etc.
18 * The \Drupal\image\Plugin\Field\FieldType\ImageItem object.
21 * The renderable array of thumbnail image.
23 public function getThumbnail(array $settings = [], $item = NULL) {
25 if (!empty($settings['uri'])) {
27 '#theme' => 'image_style',
28 '#style_name' => isset($settings['thumbnail_style']) ? $settings['thumbnail_style'] : 'thumbnail',
29 '#uri' => $settings['uri'],