Swat/SwatTableView.php
protected function validateRow(SwatTableViewRow $row)
    {
        if ($row instanceof SwatTableViewInputRow) {
            if ($this->has_input_row) {
                throw new SwatException(
                    'Only one input row may be added to a table-view.'
                );
            } else {
                $this->has_input_row = true;
            }
        }

        if ($row->id !== null) {
            if (array_key_exists($row->id, $this->rows_by_id)) {
                throw new SwatDuplicateIdException(
                    "A row with the id '{$row->id}' already exists " .
                        'in this table-view.',
                    0,
                    $row->id
                );
            }
        }
    }
protected function validateRow(SwatTableViewRow $row)
    {
        if ($row instanceof SwatTableViewInputRow) {
            if ($this->has_input_row) {
                throw new SwatException(
                    'Only one input row may be added to a table-view.'
                );
            } else {
                $this->has_input_row = true;
            }
        }

        if ($row->id !== null) {
            if (array_key_exists($row->id, $this->rows_by_id)) {
                throw new SwatDuplicateIdException(
                    "A row with the id '{$row->id}' already exists " .
                        'in this table-view.',
                    0,
                    $row->id
                );
            }
        }
    }
protected function validateRow ( SwatTableViewRow $ row ) { if ( $ row instanceof SwatTableViewInputRow ) { if ( $ this -> has_input_row ) { throw new SwatException ( 'Only one input row may be added to a table-view.' ) ; } else { $ this -> has_input_row = true ; } } if ( $ row -> id !== null ) { if ( array_key_exists ( $ row -> id , $ this -> rows_by_id ) ) { throw new SwatDuplicateIdException ( "A row with the id '{$row->id}' already exists " . 'in this table-view.' , 0 , $ row -> id ) ; } } }
Ensures a row added to this table-view is valid for this table-view

@param SwatTableViewRow $row the row to check.

@throws SwatDuplicateIdException if the row has the same id as a row
already in this table-view.
@throws SwatException if the row is an input row and this table-view
already contains an input-row.
Ensures a row added to this table - view is valid for this table - view