public function Media::setName in Drupal 10
Same name and namespace in other branches
- 8 core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::setName()
- 9 core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::setName()
Sets the media item name.
Parameters
string $name: The name of the media item.
Return value
$this
Overrides MediaInterface::setName
File
- core/
modules/ media/ src/ Entity/ Media.php, line 115
Class
- Media
- Defines the media entity class.
Namespace
Drupal\media\EntityCode
public function setName($name) {
return $this
->set('name', $name);
}