You are here

public function ImageStyle::setName in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/image/src/Entity/ImageStyle.php \Drupal\image\Entity\ImageStyle::setName()
  2. 9 core/modules/image/src/Entity/ImageStyle.php \Drupal\image\Entity\ImageStyle::setName()

Sets the name of the image style.

Parameters

string $name: The name of the image style.

Return value

$this The class instance this method is called on.

Overrides ImageStyleInterface::setName

File

core/modules/image/src/Entity/ImageStyle.php, line 443

Class

ImageStyle
Defines an image style configuration entity.

Namespace

Drupal\image\Entity

Code

public function setName($name) {
  $this
    ->set('name', $name);
  return $this;
}