You are here

public function BackgroundImageForm::setBackgroundImage in Background Image 8

Same name and namespace in other branches
  1. 2.x src/Form/BackgroundImageForm.php \Drupal\background_image\Form\BackgroundImageForm::setBackgroundImage()
  2. 2.0.x src/Form/BackgroundImageForm.php \Drupal\background_image\Form\BackgroundImageForm::setBackgroundImage()

Sets the Background Image entity.

Parameters

\Drupal\background_image\BackgroundImageInterface $background_image: A Background Image entity.

Return value

self

File

src/Form/BackgroundImageForm.php, line 610

Class

BackgroundImageForm

Namespace

Drupal\background_image\Form

Code

public function setBackgroundImage(BackgroundImageInterface $background_image) {
  $this->backgroundImage = $background_image;
  if ($this->inlineEntity) {
    $this->backgroundImage
      ->associateEntity($this->inlineEntity, FALSE);
  }
  return $this;
}