public function getSurveyCompareTable($bridge) {
        $post = $this->formData;

        $element = $bridge->getForm()->createElement('html', 'table');
        $table   = $element->table(['class' => 'browser table']);

        $bridge->addElement($element);

        $headers = [
            $this->_('Question code'),
            $this->_('Source Survey'),
            $this->_('Target Survey'),
        ];

        $tableHeader = $table->thead()->tr();

        foreach ($headers as $label) {
            $tableHeader->th($label);
        }

        $tableBody = $table->tbody();

        if ($this->sourceSurveyId && $this->targetSurveyId) {
            $row = $tableBody->tr();
            $row->td($this->_('Usage'));
            $row->td($this->getSurveyStatistics($this->sourceSurveyId));
            $row->td($this->getSurveyStatistics($this->targetSurveyId));

            $this->addSurveyCompareForm($tableBody, $post);
        }
    }
public function getSurveyCompareTable($bridge) {
        $post = $this->formData;

        $element = $bridge->getForm()->createElement('html', 'table');
        $table   = $element->table(['class' => 'browser table']);

        $bridge->addElement($element);

        $headers = [
            $this->_('Question code'),
            $this->_('Source Survey'),
            $this->_('Target Survey'),
        ];

        $tableHeader = $table->thead()->tr();

        foreach ($headers as $label) {
            $tableHeader->th($label);
        }

        $tableBody = $table->tbody();

        if ($this->sourceSurveyId && $this->targetSurveyId) {
            $row = $tableBody->tr();
            $row->td($this->_('Usage'));
            $row->td($this->getSurveyStatistics($this->sourceSurveyId));
            $row->td($this->getSurveyStatistics($this->targetSurveyId));

            $this->addSurveyCompareForm($tableBody, $post);
        }
    }
public function getSurveyCompareTable ( $ bridge ) { $ post = $ this -> formData ; $ element = $ bridge -> getForm ( ) -> createElement ( 'html' , 'table' ) ; $ table = $ element -> table ( [ 'class' => 'browser table' ] ) ; $ bridge -> addElement ( $ element ) ; $ headers = [ $ this -> _ ( 'Question code' ) , $ this -> _ ( 'Source Survey' ) , $ this -> _ ( 'Target Survey' ) , ] ; $ tableHeader = $ table -> thead ( ) -> tr ( ) ; foreach ( $ headers as $ label ) { $ tableHeader -> th ( $ label ) ; } $ tableBody = $ table -> tbody ( ) ; if ( $ this -> sourceSurveyId && $ this -> targetSurveyId ) { $ row = $ tableBody -> tr ( ) ; $ row -> td ( $ this -> _ ( 'Usage' ) ) ; $ row -> td ( $ this -> getSurveyStatistics ( $ this -> sourceSurveyId ) ) ; $ row -> td ( $ this -> getSurveyStatistics ( $ this -> targetSurveyId ) ) ; $ this -> addSurveyCompareForm ( $ tableBody , $ post ) ; } }
Get the complete comparison table

@return \MUtil_Html Form nodes
Get the complete comparison table