protected function Textimage::set in Textimage 8.4
Same name and namespace in other branches
- 8.3 src/Textimage.php \Drupal\textimage\Textimage::set()
Set a property to a specified value.
A Textimage already processed will not allow changes.
Parameters
string $property: The property to set.
mixed $value: The value to set.
Return value
$this
12 calls to Textimage::set()
- Textimage::buildUri in src/
Textimage.php - Set URI to image file.
- Textimage::load in src/
Textimage.php - Load Textimage metadata from cache.
- Textimage::process in src/
Textimage.php - Process the Textimage, with the required raw text.
- Textimage::setBubbleableMetadata in src/
Textimage.php - Sets the bubbleable metadata.
- Textimage::setEffects in src/
Textimage.php - Set the image effects.
File
- src/
Textimage.php, line 281
Class
- Textimage
- Provides a Textimage.
Namespace
Drupal\textimageCode
protected function set($property, $value) {
if (!property_exists($this, $property)) {
throw new TextimageException("Attempted to set non existing property '{$property}'");
}
if (!$this->processed) {
$this->{$property} = $value;
}
else {
throw new TextimageException("Attempted to set property '{$property}' when image was processed already");
}
return $this;
}