public function showHelpBox( $msg /*, ... */ ) {
}
+ /**
+ * @param Status $status
+ */
public function showStatusMessage( Status $status ) {
- $warnings = array_merge( $status->getWarningsArray(),
- $status->getErrorsArray() );
-
- if ( count( $warnings ) !== 0 ) {
- foreach ( $warnings as $w ) {
- call_user_func_array( array( $this, 'showMessage' ), $w );
- }
- }
-
+ parent::showStatusMessage( $status );
if ( !$status->isOk() ) {
echo "\n";
exit( 1 );
abstract public function showError( $msg /*, ... */ );
/**
- * Show a message to the installing user by using a Status object
+ * Shows messages to the user through a Status object
* @param Status $status
*/
- abstract public function showStatusMessage( Status $status );
+ public function showStatusMessage( Status $status ) {
+ $errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() );
+ if ( $errors ) {
+ foreach ( $errors as $error ) {
+ call_user_func( 'showMessage', $error );
+ }
+ }
+ }
/**
* Constructor, always call this from child classes.
$this->output->addHTML( $html );
}
- /**
- * @param Status $status
- */
- public function showStatusMessage( Status $status ) {
- $errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() );
- foreach ( $errors as $error ) {
- call_user_func_array( array( $this, 'showMessage' ), $error );
- }
- }
-
/**
* Label a control by wrapping a config-input div around it and putting a
* label before it.