public function initializeCell($cell, $columnIndex, $itemType)
{
if ($itemType === TListItemType::Item || $itemType === TListItemType::AlternatingItem || $itemType === TListItemType::SelectedItem || $itemType === TListItemType::EditItem) {
$link = new THyperLink();
if (($url = $this->getImageUrl()) !== '') {
$link->setImageUrl($url);
if (($width = $this->getImageWidth()) !== '') {
$link->setImageWidth($width);
}
if (($height = $this->getImageHeight()) !== '') {
$link->setImageHeight($height);
}
}
$link->setText($this->getText());
$link->setNavigateUrl($this->getNavigateUrl());
$link->setTarget($this->getTarget());
if ($this->getDataTextField() !== '' || $this->getDataNavigateUrlField() !== '') {
$link->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
}
$cell->getControls()->add($link);
$cell->registerObject('HyperLink', $link);
} else {
parent::initializeCell($cell, $columnIndex, $itemType);
}
}