/** * Apply current view layout from questions view to proposal view */ static function applyViewState( qp_StubQuestionView $view ) { self::$showResults = $view->showResults; self::$showResultsMethod = 'addShowResults' . self::$showResults['type']; self::$cellTemplateMethod = 'cellTemplate' . self::$showResults['type']; # text questions do not have categories and thus no borders around cells if ( property_exists( $view, 'signClass' ) ) { self::$signClass = $view->signClass; } }
/** * Apply current view layout from questions view to proposal view * * Please clone this method in derived classes until the code is * moved from early to late static binding */ static function applyViewState( qp_StubQuestionView $view ) { parent::applyViewState( $view ); # initialize cell template for selected showresults # todo: this is self (PHP 5.2), not static (PHP 5.3) # do not forget to clone this method in ancestors self::$spanState = (object) array( 'id' => 0, 'prevId' => -1, 'wasChecked' => true, 'isDrawing' => false, 'cellsLeft' => 0, 'className' => 'sign' ); if ( self::$showResults['type'] != 0 ) { call_user_func( array( __CLASS__, self::$cellTemplateMethod ) ); } }