PMA\libraries\Message::success PHP Method

success() public static method

shorthand for getting a simple success message
public static success ( string $string = '' ) : Message
$string string A localized string e.g. __('Your SQL query has been executed successfully')
return Message
    public static function success($string = '')
    {
        if (empty($string)) {
            $string = __('Your SQL query has been executed successfully.');
        }
        return new Message($string, Message::SUCCESS);
    }

Usage Example

 /**
  * Handles actions related to multiple tables
  *
  * @return void
  */
 public function multiSubmitAction()
 {
     $action = 'db_structure.php';
     $err_url = 'db_structure.php' . PMA_URL_getCommon(array('db' => $this->db));
     // see bug #2794840; in this case, code path is:
     // db_structure.php -> libraries/mult_submits.inc.php -> sql.php
     // -> db_structure.php and if we got an error on the multi submit,
     // we must display it here and not call again mult_submits.inc.php
     if (!isset($_POST['error']) || false === $_POST['error']) {
         include 'libraries/mult_submits.inc.php';
     }
     if (empty($_POST['message'])) {
         $_POST['message'] = Message::success();
     }
 }
All Usage Examples Of PMA\libraries\Message::success