Hi all. I’d like to share with you our little extensions collection, maybe some of them will be useful. :)


  • base
  • yii2-cms
  • yii2-bx-slider
  • yii2-ion-slider
  • yii2-settings
  • yii2-tree
  • yii2-toggle-column
  • yii2-chosen-select
  • yii2-editable
  • yii2-image
  • yii2-cron-log
  • yii2-gii-extended
  • yii2-pie
  • yii2-feed
  • yii2-enum
  • yii2-rbac
  • yii2-user
  • yii2-sweet-alert
  • yii2-ftp
  • yii2-hg
  • yii2-cart
  • yii2-timezone

Great stuff :)

(I added the link to your post)

impressive list of extensions !! I will use it …Great job disem !!



Hello -

Just tried to load one of the components and having some difficulty. It may be something not set up correctly on my maching.

I’m trying to user the yii2-sweet-alert component.

I added

"yii2mod/yii2-sweet-alert": "*"

To composer.json file. I have done this for other components and seemed to work just fine, but when I run the ‘composer update’ on the project I get the dreaded -

  Problem 1

  - The requested package yii2mod/yii2-sweet-alert could not be found in any version,

 there may be a typo in the package name.

Do I need to do anything to allow pulling the yii2mod components like others?



More reading -

Is it OK to do this to the composer.json file?

"minimum-stability": "dev", "prefer-stable" : true

Seemed to work OK once I did that.

Ok, I’m brain dead :)

I installed the yii2mod-sweet-alert (via composer).

It put things into a directory path of -


In my about.php view file I put in -

<?php echo \yii2mod\yii2-sweet-alert\Alert::widget([

      	'useSessionFlash' => false,

      	'options' => [

       		'title' => 'Success message',

       		'type' => 'Success',

       		'text' => "You will not be able to recover this imaginary file!",

       		'confirmButtonText'  => "Yes, delete it!",   

       		'cancelButtonText' =>  "No, cancel plx!"




But can’t get past the syntax error since the path not valid for use as an object path due to the ‘-’

PHP error is

Undefined constant 'yii2mod\yii2'

I am missing something pretty simple as this seems to be the way to do it…


Ok, learning more about the loader and assets their are bugs Sweet Alert components code -

The location/name of the sourcePath is incorrect, as many of the names have ‘sweet-alert’ instead of ‘sweetalert’ which is what is being used. (look in .../vendors/sweetalert)

Also it had names referencing ‘sweet-alert’ where were changed to ‘sweetalert’

Here is the AlertAsset.php that I modifed and now works -


namespace yii2mod\alert;

use yii\web\AssetBundle;


 * Class AlertAsset

 * @package yii2mod\alert


class AlertAsset extends AssetBundle



 	* @var string the directory that contains the source asset files for this asset bundle.

 	* A source asset file is a file that is part of your source code repository of your Web application.


	public $sourcePath = '@bower/sweetalert/dist'; /*was lib*/


 	* @var array list of JavaScript files that this bundle contains. Each JavaScript file can be

 	* specified in one of the following formats:


	public $js = [

    	'sweetalert.min.js', /* was sweet-alert.min.js */



 	* @var array list of CSS files that this bundle contains. Each CSS file can be specified

 	* in one of the three formats as explained in [[js]].


	public $css = [

    	'sweetalert.css' /* ws sweet-alert.css */



The code now in my view looks like this -

<?php  echo yii2mod\alert\Alert::widget([

      	'useSessionFlash' => false,

      	'options' => [

       		'title' => 'Success message',


       		'text' => "You will not be able to recover this imaginary file!",

       		'confirmButtonText'  => "Yes, delete it!",   

       		'cancelButtonText' =>  "No, cancel!"





I install the bx-slider extension and work great but i have a litter problem…

I’m trying to use two bx-slider (bx-slider1 and bx-slider2 for example) in the same page but the controls appears in the two of them

for example:

with one bx-slider the controls should be < > and works OK

but with two different bx-sliders this appear in the two of them <<< >>>

the first < represent the prev of bx-slider1

the second < represent the prev of bx-slider1 and bx-slider2

the third < represent the prev of bx-slider2

the same for the >>> but with the next…

and i need only one of each "< >" in every bx-slider that i use…