Prado\Web\UI\WebControls\TDataGrid::initializeItem PHP Méthode

initializeItem() protected méthode

Initializes a datagrid item and cells inside it
protected initializeItem ( $item, $columns )
    protected function initializeItem($item, $columns)
    {
        $cells = $item->getCells();
        $itemType = $item->getItemType();
        $index = 0;
        foreach ($columns as $column) {
            if ($itemType === TListItemType::Header) {
                $cell = new TTableHeaderCell();
            } else {
                $cell = new TTableCell();
            }
            if (($id = $column->getID()) !== '') {
                $item->registerObject($id, $cell);
            }
            $cells->add($cell);
            $column->initializeCell($cell, $index, $itemType);
            $index++;
        }
    }