public function generateItemStyle($itemType, $index)
{
if (($item = $this->getItem($itemType, $index)) !== null && $item instanceof IStyleable && $item->getHasStyle()) {
$style = $item->getStyle();
$item->clearStyle();
return $style;
} else {
return null;
}
}