Skip to content
Snippets Groups Projects
Commit aca231a5 authored by John Franklin's avatar John Franklin
Browse files

Include EntityInterface in the generateBackgroundCss() function signature.

parent f6c37251
No related branches found
No related tags found
1 merge request!73484416-addressed-pipelines-issues: Fixed the issues.
......@@ -3,6 +3,7 @@
namespace Drupal\bg_img_field\Plugin\Field\FieldFormatter;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
......@@ -341,7 +342,7 @@ class BgImgFieldFormatter extends ResponsiveImageFormatter implements ContainerF
/**
* CSS Generator Helper Function.
*
* @param object $image
* @param Drupal\Core\Entity\EntityInterface $file
* URI of the field image.
* @param string $responsive_image_style
* Desired picture mapping to generate CSS.
......@@ -353,7 +354,7 @@ class BgImgFieldFormatter extends ResponsiveImageFormatter implements ContainerF
* @return string
* Generated background image CSS.
*/
protected function generateBackgroundCss($file, $responsive_image_style, $selector, array $options) {
protected function generateBackgroundCss(EntityInterface $file, $responsive_image_style, $selector, array $options) {
$css = "";
if (!$file) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment