protected function modifyGroupTypeValue($value)
{
$this->setDefaultLastValue('groupType', $this->getOptions()['defaultValue']);
$lastValue = is_array($this->getLastValue()) ? reset($this->getLastValue()) : $this->getLastValue();
// If the bit we are expecting is already set how we want it, then do not attempt to modify it.
if ($this->fromLdap($lastValue) == $value) {
return $lastValue;
}
if (in_array($this->getAttribute(), $this->getOptions()['types']['type'])) {
$value = $this->shouldInvertValue() ? !$value : $value;
$this->setLastValue($this->modifyBitmaskValue($lastValue, $value, $this->getAttribute()));
} else {
$this->modifyGroupScopeBit($lastValue, $value);
}
return (string) $this->getLastValue();
}