public function findIndexByValue($value, $includeDisabled = true)
{
$value = TPropertyValue::ensureString($value);
$index = 0;
foreach ($this as $item) {
if ($item->getValue() === $value && ($includeDisabled || $item->getEnabled())) {
return $index;
}
$index++;
}
return -1;
}