Prado\Web\UI\WebControls\THyperLinkColumn::initializeCell PHP Method

initializeCell() public method

This method overrides the parent implementation. It creates a hyperlink within the cell.
public initializeCell ( $cell, $columnIndex, $itemType )
    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);
        }
    }