Prado\Web\UI\WebControls\TEditCommandColumn::initializeCell PHP Метод

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

This method overrides the parent implementation. It creates an update and a cancel button for cell in edit mode. Otherwise it creates an edit button.
public initializeCell ( $cell, $columnIndex, $itemType )
    public function initializeCell($cell, $columnIndex, $itemType)
    {
        if ($itemType === TListItemType::Item || $itemType === TListItemType::AlternatingItem || $itemType === TListItemType::SelectedItem) {
            $button = $this->createButton('Edit', $this->getEditText(), false, '');
            $cell->getControls()->add($button);
            $cell->registerObject('EditButton', $button);
        } else {
            if ($itemType === TListItemType::EditItem) {
                $controls = $cell->getControls();
                $button = $this->createButton('Update', $this->getUpdateText(), $this->getCausesValidation(), $this->getValidationGroup());
                $controls->add($button);
                $cell->registerObject('UpdateButton', $button);
                $controls->add(' ');
                $button = $this->createButton('Cancel', $this->getCancelText(), false, '');
                $controls->add($button);
                $cell->registerObject('CancelButton', $button);
            } else {
                parent::initializeCell($cell, $columnIndex, $itemType);
            }
        }
    }