You are here

public function RoleWatchdog::setPublished in Role Watchdog 8

Sets the published status of a Role Watchdog.

Parameters

bool $published: TRUE to set this Role Watchdog to published, FALSE to set it to unpublished.

Return value

\Drupal\role_watchdog\Entity\RoleWatchdogInterface The called Role Watchdog entity.

Overrides RoleWatchdogInterface::setPublished

File

src/Entity/RoleWatchdog.php, line 146

Class

RoleWatchdog
Defines the Role Watchdog entity.

Namespace

Drupal\role_watchdog\Entity

Code

public function setPublished($published) {
  $this
    ->set('status', $published ? TRUE : FALSE);
  return $this;
}