You are here

public function Profile::setType in Profile 2 8

Sets the profile type.

Parameters

string $type: The profile type.

Return value

\Drupal\profile\ProfileInterface The called profile entity.

Overrides ProfileInterface::setType

File

src/Entity/Profile.php, line 154
Contains \Drupal\profile\Entity\Profile.

Class

Profile
Defines the profile entity class.

Namespace

Drupal\profile\Entity

Code

public function setType($type) {
  $this
    ->set('type', $this
    ->bundle());
  return $this;
}