public function GroupRole::setWeight in Group 2.0.x
Same name and namespace in other branches
- 8 src/Entity/GroupRole.php \Drupal\group\Entity\GroupRole::setWeight()
Sets the weight to the given value.
Parameters
int $weight: The desired weight.
Return value
\Drupal\group\Entity\GroupRoleInterface The group role this was called on.
Overrides GroupRoleInterface::setWeight
File
- src/
Entity/ GroupRole.php, line 146
Class
- GroupRole
- Defines the Group role configuration entity.
Namespace
Drupal\group\EntityCode
public function setWeight($weight) {
$this
->set('weight', $weight);
return $this;
}