Download the PHP package pa3py6aka/yii2-modal-alert-widget without Composer

On this page you can find all versions of the php package pa3py6aka/yii2-modal-alert-widget. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-modal-alert-widget

Yii2 Modal Alert Widget

Latest Stable Version License Total Downloads Monthly Downloads Daily Downloads

This widget show bootstrap modal or magnific popup when you set session flash message.

Supports all bootstrap versions - 3,4 and 5.

For magnific popups you must install magnific js before using this widget - http://dimsemenov.com/plugins/magnific-popup/

And for bootstrap modals of course you must set up bootstrap in your project.

Installation

Install with composer:

or add

to the require section of your composer.json file.

Usage

In controller set flash message:

In your layout view show this widget:

By default widget using bootstrap 4 modal. Use type property to switch to another modal type:

You can set flashes with titles:

Available options

type - Type of alert - bootstrap 3/4/5 jquery or magnific popup, defaults to bootstrap 4. Bootstrap 5 type has two versions - with jQuery enabled and without jQuery. Use declared constants to set type (like ModalAlert::TYPE_BOOTSTRAP_5_JQUERY). See available types in source code.

popupCssClass - CSS class for modal(popup).

popupId - Modal(popup) ID.

magnificPopupType - Type of magnific popup, defaults to "inline". See available types in official magnific popup guide.

popupView - Path to your custom view for render modal(popup). You can copy original view from vendor/pa3py6aka/yii2-modal-alert-widget/src/views and customize it.

showTime - Time in seconds after which the modal window will be automatically closed (0 means that modal will be closed only by user)

modalSize - Bootstrap Modal size, available size modal-sm, modal-lg, modal-xl, and modal-fullscreen (for Bootstrap 5 only), default to ''

Example

Then, set flash:

And we get: Alt text


All versions of yii2-modal-alert-widget with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ~2.0.13
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pa3py6aka/yii2-modal-alert-widget contains the following files

Loading the files please wait ....