public function TextimageFactory::isTextimage in Textimage 8.4
Same name and namespace in other branches
- 8.3 src/TextimageFactory.php \Drupal\textimage\TextimageFactory::isTextimage()
Checks if an image style is Textimage relevant.
Parameters
\Drupal\image\ImageStyleInterface $image_style: The image style to check.
Return value
bool TRUE if style is Textimage relevant, otherwise FALSE
Overrides TextimageFactoryInterface::isTextimage
1 call to TextimageFactory::isTextimage()
- TextimageFactory::getTextimageStyleOptions in src/
TextimageFactory.php - Gets an array of Textimage image styles suitable for select list options.
File
- src/
TextimageFactory.php, line 195
Class
- TextimageFactory
- Provides a factory for Textimage.
Namespace
Drupal\textimageCode
public function isTextimage(ImageStyleInterface $image_style) {
foreach ($image_style
->getEffects() as $effect) {
$definition = $effect
->getPluginDefinition();
if ($definition['id'] == 'image_effects_text_overlay') {
return TRUE;
}
}
return FALSE;
}