You are here

public function ResponsiveImageStyle::hasImageStyleMappings in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php \Drupal\responsive_image\Entity\ResponsiveImageStyle::hasImageStyleMappings()

Checks if there is at least one mapping defined.

Return value

bool Whether the entity has any image style mappings.

Overrides ResponsiveImageStyleInterface::hasImageStyleMappings

File

core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php, line 130
Contains \Drupal\responsive_image\Entity\ResponsiveImageStyle.

Class

ResponsiveImageStyle
Defines the responsive image style entity.

Namespace

Drupal\responsive_image\Entity

Code

public function hasImageStyleMappings() {
  $mappings = $this
    ->getKeyedImageStyleMappings();
  return !empty($mappings);
}