public function FocalPoint::resolve in Thunder 6.2.x
Resolve the focal point positions.
Parameters
\Drupal\file\FileInterface $file: The entity.
Return value
mixed The focal point position tag.
File
- modules/
thunder_gqls/ src/ Plugin/ GraphQL/ DataProducer/ FocalPoint.php, line 108
Class
- FocalPoint
- Resolves the focal point positions for a file.
Namespace
Drupal\thunder_gqls\Plugin\GraphQL\DataProducerCode
public function resolve(FileInterface $file) {
if (!$this->moduleHandler
->moduleExists('focal_point')) {
return '';
}
return $this->focalPointManager
->getCropEntity($file, $this->config
->get('crop_type'))
->position();
}