Prado\Web\UI\ActiveControls\TActiveButtonColumn::initializeCell PHP Метод

initializeCell() публичный Метод

public initializeCell ( $cell, $columnIndex, $itemType )
    public function initializeCell($cell, $columnIndex, $itemType)
    {
        if ($itemType === TListItemType::Item || $itemType === TListItemType::AlternatingItem || $itemType === TListItemType::SelectedItem || $itemType === TListItemType::EditItem) {
            $buttonType = $this->getButtonType();
            if ($buttonType === TButtonColumnType::LinkButton) {
                $button = new TActiveLinkButton();
            } else {
                if ($buttonType === TButtonColumnType::PushButton) {
                    $button = new TActiveButton();
                } else {
                    $button = new TActiveImageButton();
                    $button->setImageUrl($this->getImageUrl());
                    $button->setToolTip($this->getText());
                }
            }
            $button->setText($this->getText());
            $button->setCommandName($this->getCommandName());
            $button->setCausesValidation($this->getCausesValidation());
            $button->setValidationGroup($this->getValidationGroup());
            if ($this->getDataTextField() !== '' || $buttonType === TButtonColumnType::ImageButton && $this->getDataImageUrlField() !== '') {
                $button->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
            }
            $cell->getControls()->add($button);
            $cell->registerObject('Button', $button);
        } else {
            parent::initializeCell($cell, $columnIndex, $itemType);
        }
    }
TActiveButtonColumn