You are here

public function Event::setMachineName in Event 8

Sets the Event machine name.

Parameters

string $name: The Event name.

Return value

\Drupal\event\Entity\EventInterface The called Event entity.

Overrides EventInterface::setMachineName

File

src/Entity/Event.php, line 158

Class

Event
Defines the Event entity.

Namespace

Drupal\event\Entity

Code

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