You are here

public function Profile::removeAttribute in Linkit 8.4

Removes an attribute from this profile.

Parameters

string $attribute_id: The attribute ID.

Return value

$this

Overrides ProfileInterface::removeAttribute

File

src/Entity/Profile.php, line 162
Contains \Drupal\linkit\Entity\Profile.

Class

Profile
Defines the linkit profile entity.

Namespace

Drupal\linkit\Entity

Code

public function removeAttribute($attribute_id) {
  unset($this->attributes[$attribute_id]);
  $this
    ->getAttributes()
    ->removeInstanceId($attribute_id);
  return $this;
}