You are here

public function BlazyVideoTrait::imageFactory in Blazy 8.2

Same name and namespace in other branches
  1. 8 src/Dejavu/BlazyVideoTrait.php \Drupal\blazy\Dejavu\BlazyVideoTrait::imageFactory()

Returns the image factory.

@todo remove null check post Blazy 8.2.x full release.

File

src/Dejavu/BlazyVideoTrait.php, line 50

Class

BlazyVideoTrait
A Trait common for Media integration.

Namespace

Drupal\blazy\Dejavu

Code

public function imageFactory() {
  if (is_null($this->imageFactory)) {
    $this->imageFactory = \Drupal::service('image.factory');
  }
  return $this->imageFactory;
}