You are here

public function Textimage::setTemporary in Textimage 8.4

Same name and namespace in other branches
  1. 8.3 src/Textimage.php \Drupal\textimage\Textimage::setTemporary()

Set Textimage to be temporary.

Parameters

bool $is_temp: FALSE if caching is required for this Textimage.

Return value

$this

Overrides TextimageInterface::setTemporary

File

src/Textimage.php, line 366

Class

Textimage
Provides a Textimage.

Namespace

Drupal\textimage

Code

public function setTemporary($is_temp) {
  if ($this->uri) {
    throw new TextimageException("URI already set");
  }
  $this
    ->set('caching', !$is_temp);
  return $this;
}