You are here

public function Profile::setDefault in Profile 8

Sets whether this is the user's default profile.

Parameters

bool $is_default: Whether this is the user's default profile.

Return value

$this

Overrides ProfileInterface::setDefault

1 call to Profile::setDefault()
Profile::preSave in src/Entity/Profile.php
Acts on an entity before the presave hook is invoked.

File

src/Entity/Profile.php, line 134

Class

Profile
Defines the profile entity class.

Namespace

Drupal\profile\Entity

Code

public function setDefault($is_default) {
  $this
    ->set('is_default', (bool) $is_default);
  return $this;
}