Flash a success message

@param  string      $message
@param  bool        $dismissable
@param  string|null $title
@return $this
489193
public function success($message, $dismissable = true, $title = null)
    {
        return $this->make($message, $title, $dismissable, __FUNCTION__);
    }
27964
public function overlay( $message = '', $title = '', $level = null ) {
		$overlay = true;

		// If no message was provided, we should update
		// the most recently added message.
		if ( ! $message ) {
			return $this->update_last_message( compact( 'title', 'overlay', 'level' ) );
		}

		return $this->add_message(
			new Message( compact( 'title', 'message', 'overlay', 'level' ) )
		);
	}
183272
protected function notify($title, $message, $icon = null)
    {
        $icon = is_string($icon) ? $icon : $this->icon;

        $this->execute("notify-send -t 2000 -i {$icon} '{$title}' '$message'");
    }
1120360
public static function flash( $name = '', $message = '', $class = 'success fadeout-message' )
    {
        //We can only do something if the name isn't empty
        if( !empty( $name ) )
        {
            //No message, create it
            if( !empty( $message ) && empty( $_SESSION[$name] ) )
            {
                if( !empty( $_SESSION[$name] ) )
                {
                    unset( $_SESSION[$name] );
                }
                if( !empty( $_SESSION[$name.'_class'] ) )
                {
                    unset( $_SESSION[$name.'_class'] );
                }

                $_SESSION[$name]          = $message;
                $_SESSION[$name.'_class'] = $class;
            }
            //Message exists, display it
            elseif( !empty( $_SESSION[$name] ) && empty( $message ) )
            {
                $class   = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';
                $message = $_SESSION[$name];
                echo '<div class="ui '.$class.' message">'.$message.'</div>';
                unset($_SESSION[$name]);
                unset($_SESSION[$name.'_class']);
            }
        }
    }
712359
protected function notifyFlash($message, $type, $title = null, array $options = [])
    {
        $this->notify()->flash($message, $type, array_merge($options, compact('title')));
    }
1113498
public function notificationAjax(string $title, string $message, string $type = 'default', bool $send_payload = TRUE): void
    {
        if ($this->isAjax())
        {
            $this->payload->notifications[] = $this->createNotification($title, $message, $type);

            if ($send_payload === TRUE)
            {
                $this->sendPayload();
            }
        }
    }
841115
public function flash($message = null)
    {
        // set
        if ($message !== null) {
            $this->set('@flash', $message);
        } else { // get
            $message = $this->get('@flash');
            $this->remove('@flash');
            return $message;
        }
    }
664555
protected function save($successMessage, $failureMessage)
    {
        try {
            $this->getEntityManager()->flush();
            $this->addMessage($successMessage, FlashMessenger::NAMESPACE_SUCCESS);
            return true;
        } catch (\Exception $e) {
            $this->addMessage($failureMessage, FlashMessenger::NAMESPACE_ERROR);

            // Check exception type
            if ($e instanceof \Doctrine\DBAL\DBALException) {
                $previous = $e->getPrevious();
                if ($previous instanceof \Doctrine\DBAL\Driver\Mysqli\MysqliException) {

                    // Check exception type
                    switch ($previous->getCode()) {
                        case 1062:
                            $this->addMessage(
                                    'You are using details that already exist.', 'error'
                            );
                            return false;
                    }
                }
            }

            /**
             * TO BE REMOVED -- BELOW
             */
            throw new \Exception('You are seeing this because this error needs to be properly handled.', 0, $e);
            /**
             * TO BE REMOVED -- ABOVE
             */
            return false;
        }
    }
556264
protected function sendFlashMessage()
    {
        $bFlashOn = $this->property(self::PROPERTY_FLASH_ON);
        if (!$bFlashOn) {
            return;
        }

        $sMessage = Result::message();
        if (empty($sMessage)) {
            return;
        }

        if (Result::status()) {
            Flash::success($sMessage);
        } else {
            Flash::error($sMessage);
        }
    }
842416
public function addToFlashMessenger($title, $message, $img = 'glyphicon glyphicon-info-sign', $logDate = null)
    {
        $this->fmContainer = new Container('fms');
        
        $container = new Container('meliscore');
        $locale = $container['melis-lang-locale'];
        
        // create date time
        if(is_null($logDate)){
            $time = date('h:i A');
            $date = date('M d y');
        }else{
            $time = date('h:i A', strtotime($logDate));
            $date = date('M d y',  strtotime($logDate));
        }

        $translatorSvc = $this->getServiceLocator()->get('MelisCoreTranslation');

        $tool       = $this->getServiceLocator()->get('MelisCoreTool');

        $title      = $tool->escapeHtml($title);
        $title      = !empty($translatorSvc->getMessage($title, $locale))? $translatorSvc->getMessage($title, $locale) : $title;
        $message    = $tool->escapeHtml($message);
        $message    = !empty($translatorSvc->getMessage($message, $locale))? $translatorSvc->getMessage($message, $locale) : $message;
        
        $curFlashMessages = $this->fmContainer->flashMessages;
        $newFlashMessage = array(
            'title' => $title,
            'message'=> $message,
            'image'  => $img,
            'time' => $time,
            'date' => $date,
            'date_trans' => $this->dateMod($date, $locale),
        );
        
        if(!empty($curFlashMessages))
        {
            array_push($curFlashMessages, $newFlashMessage);
        }
        else 
        {
            $curFlashMessages[0] = $newFlashMessage;
        }
        
        $this->fmContainer->flashMessages = $curFlashMessages;
    }
360497
public function sendMessage($title, $msg, $icon = null)
    {
        $this->notify($title, $msg, is_string($icon) ? $icon : realpath($this->icon));

        return $this;
    }
626428
public function flashMessage($message, string $type = 'info'): stdClass
	{
		parent::flashMessage($message, $type);
		return $this->presenter->flashMessage($message, $type);
	}
1027977
public static ProgressDialogFragment create(CharSequence title, CharSequence message, boolean cancelable) {
        ProgressDialogFragment dialogFragment = new ProgressDialogFragment();
        dialogFragment.mTitle = title;
        dialogFragment.mMessage = message;
        dialogFragment.setCancelable(cancelable);
        return dialogFragment;
    }
794540
public function postLink($title, $url = null, $options = array(), $confirmMessage = false) {
		$exit = false;
		if (isset($options['onHide'])){
			list($url,$options,$exit)= $this->_onHide($url,$options);
		}
		return  ($exit)? false : parent::postLink($title,$url,$options,$confirmMessage);		
	}
678575
public function title(string $message)
    {
        $this->style->newLine();
        $this->output->writeln(sprintf(
            '<highlight>>></> <title>%s</>',
            OutputFormatter::escapeTrailingBackslash(strtoupper($message))
        ));
        $this->style->newLine();
    }
1252272
public function add($type, $message, $title = null)
    {
        $notifications = $this->getNotifications();

        $notifications[] = [
            'type'    => $type,
            'message' => $message,
            'title'   => $title
        ];

        $this->session->flash(self::SESSION_KEY, $notifications);
    }
143772
public void confirm(final int title, final int message,
                        final DialogInterface.OnClickListener onClickListener) {
        final AlertDialog.Builder builder = new AlertDialog.Builder(
                getContext());
        builder.setTitle(title).setIcon(android.R.drawable.ic_dialog_info).setMessage(message);
        builder.setPositiveButton(android.R.string.ok,
                new DialogInterface.OnClickListener() {

                    @Override
                    public void onClick(final DialogInterface dialog,
                                        final int which) {
                        if (onClickListener != null) {
                            onClickListener.onClick(dialog, which);
                        }

                    }
                });
        builder.setNegativeButton(android.R.string.cancel,
                new DialogInterface.OnClickListener() {

                    @Override
                    public void onClick(final DialogInterface dialog,
                                        final int which) {
                        if (onClickListener != null) {
                            onClickListener.onClick(dialog, which);
                        }
                    }
                });
        builder.show();
    }