Swat/SwatTableViewInputRow.php
private function displayInputRows()
    {
        $columns = $this->parent->getVisibleColumns();

        foreach ($this->replicators as $replicator_id) {
            $messages = array();

            $row_has_messages = false;
            foreach ($this->input_cells as $cell) {
                if ($cell->getWidget($replicator_id)->hasMessage()) {
                    $row_has_messages = true;
                    break;
                }
            }

            $tr_tag = new SwatHtmlTag('tr');
            $tr_tag->class = 'swat-table-view-input-row';
            $tr_tag->id = $this->getId() . '_row_' . $replicator_id;

            if ($row_has_messages && $this->show_row_messages) {
                $tr_tag->class .= ' swat-error';
            }

            $tr_tag->open();

            foreach ($columns as $column) {
                // use the same style as table-view column
                $td_attributes = $column->getTdAttributes();
                $td_tag = new SwatHtmlTag('td', $td_attributes);

                if (isset($this->input_cells[$column->id])) {
                    $widget = $this->input_cells[$column->id]->getWidget(
                        $replicator_id
                    );

                    if (
                        $this->show_row_messages &&
                        count($widget->getMessages()) > 0
                    ) {
                        $messages = array_merge(
                            $messages,
                            $widget->getMessages()
                        );

                        $td_tag->class .= ' swat-error';
                    }
                }

                $td_tag->open();

                if (isset($this->input_cells[$column->id])) {
                    $this->input_cells[$column->id]->display($replicator_id);
                } else {
                    echo '&nbsp;';
                }

                $td_tag->close();
            }
            $tr_tag->close();

            if ($this->show_row_messages && count($messages) > 0) {
                $tr_tag = new SwatHtmlTag('tr');
                $tr_tag->class = 'swat-table-view-input-row-messages';
                $tr_tag->open();

                $td_tag = new SwatHtmlTag('td');
                $td_tag->colspan = count($columns);
                $td_tag->open();

                $ul_tag = new SwatHtmlTag('ul');
                $ul_tag->class = 'swat-table-view-input-row-messages';
                $ul_tag->open();

                $li_tag = new SwatHtmlTag('li');
                foreach ($messages as &$message) {
                    $li_tag->setContent(
                        $message->primary_content,
                        $message->content_type
                    );

                    $li_tag->class = $message->getCSSClassString();
                    $li_tag->display();
                }

                $ul_tag->close();

                $td_tag->close();
                $tr_tag->close();
            }
        }
    }
private function displayInputRows()
    {
        $columns = $this->parent->getVisibleColumns();

        foreach ($this->replicators as $replicator_id) {
            $messages = array();

            $row_has_messages = false;
            foreach ($this->input_cells as $cell) {
                if ($cell->getWidget($replicator_id)->hasMessage()) {
                    $row_has_messages = true;
                    break;
                }
            }

            $tr_tag = new SwatHtmlTag('tr');
            $tr_tag->class = 'swat-table-view-input-row';
            $tr_tag->id = $this->getId() . '_row_' . $replicator_id;

            if ($row_has_messages && $this->show_row_messages) {
                $tr_tag->class .= ' swat-error';
            }

            $tr_tag->open();

            foreach ($columns as $column) {
                // use the same style as table-view column
                $td_attributes = $column->getTdAttributes();
                $td_tag = new SwatHtmlTag('td', $td_attributes);

                if (isset($this->input_cells[$column->id])) {
                    $widget = $this->input_cells[$column->id]->getWidget(
                        $replicator_id
                    );

                    if (
                        $this->show_row_messages &&
                        count($widget->getMessages()) > 0
                    ) {
                        $messages = array_merge(
                            $messages,
                            $widget->getMessages()
                        );

                        $td_tag->class .= ' swat-error';
                    }
                }

                $td_tag->open();

                if (isset($this->input_cells[$column->id])) {
                    $this->input_cells[$column->id]->display($replicator_id);
                } else {
                    echo '&nbsp;';
                }

                $td_tag->close();
            }
            $tr_tag->close();

            if ($this->show_row_messages && count($messages) > 0) {
                $tr_tag = new SwatHtmlTag('tr');
                $tr_tag->class = 'swat-table-view-input-row-messages';
                $tr_tag->open();

                $td_tag = new SwatHtmlTag('td');
                $td_tag->colspan = count($columns);
                $td_tag->open();

                $ul_tag = new SwatHtmlTag('ul');
                $ul_tag->class = 'swat-table-view-input-row-messages';
                $ul_tag->open();

                $li_tag = new SwatHtmlTag('li');
                foreach ($messages as &$message) {
                    $li_tag->setContent(
                        $message->primary_content,
                        $message->content_type
                    );

                    $li_tag->class = $message->getCSSClassString();
                    $li_tag->display();
                }

                $ul_tag->close();

                $td_tag->close();
                $tr_tag->close();
            }
        }
    }
private function displayInputRows ( ) { $ columns = $ this -> parent -> getVisibleColumns ( ) ; foreach ( $ this -> replicators as $ replicator_id ) { $ messages = array ( ) ; $ row_has_messages = false ; foreach ( $ this -> input_cells as $ cell ) { if ( $ cell -> getWidget ( $ replicator_id ) -> hasMessage ( ) ) { $ row_has_messages = true ; break ; } } $ tr_tag = new SwatHtmlTag ( 'tr' ) ; $ tr_tag -> class = 'swat-table-view-input-row' ; $ tr_tag -> id = $ this -> getId ( ) . '_row_' . $ replicator_id ; if ( $ row_has_messages && $ this -> show_row_messages ) { $ tr_tag -> class .= ' swat-error' ; } $ tr_tag -> open ( ) ; foreach ( $ columns as $ column ) { // use the same style as table-view column $ td_attributes = $ column -> getTdAttributes ( ) ; $ td_tag = new SwatHtmlTag ( 'td' , $ td_attributes ) ; if ( isset ( $ this -> input_cells [ $ column -> id ] ) ) { $ widget = $ this -> input_cells [ $ column -> id ] -> getWidget ( $ replicator_id ) ; if ( $ this -> show_row_messages && count ( $ widget -> getMessages ( ) ) > 0 ) { $ messages = array_merge ( $ messages , $ widget -> getMessages ( ) ) ; $ td_tag -> class .= ' swat-error' ; } } $ td_tag -> open ( ) ; if ( isset ( $ this -> input_cells [ $ column -> id ] ) ) { $ this -> input_cells [ $ column -> id ] -> display ( $ replicator_id ) ; } else { echo '&nbsp;' ; } $ td_tag -> close ( ) ; } $ tr_tag -> close ( ) ; if ( $ this -> show_row_messages && count ( $ messages ) > 0 ) { $ tr_tag = new SwatHtmlTag ( 'tr' ) ; $ tr_tag -> class = 'swat-table-view-input-row-messages' ; $ tr_tag -> open ( ) ; $ td_tag = new SwatHtmlTag ( 'td' ) ; $ td_tag -> colspan = count ( $ columns ) ; $ td_tag -> open ( ) ; $ ul_tag = new SwatHtmlTag ( 'ul' ) ; $ ul_tag -> class = 'swat-table-view-input-row-messages' ; $ ul_tag -> open ( ) ; $ li_tag = new SwatHtmlTag ( 'li' ) ; foreach ( $ messages as & $ message ) { $ li_tag -> setContent ( $ message -> primary_content , $ message -> content_type ) ; $ li_tag -> class = $ message -> getCSSClassString ( ) ; $ li_tag -> display ( ) ; } $ ul_tag -> close ( ) ; $ td_tag -> close ( ) ; $ tr_tag -> close ( ) ; } } }
Displays the actual XHTML input rows for this input row

Displays a row for each replicator id in this input row. Each row is
displayed using cloned widgets inside {@link SwatInputCell} objects.

@see SwatTableViewInputRow::display()
Displays the actual XHTML input rows for this input row