static public function registerStack($stacks,$view)
    {
    	if ( ! is_array($stacks)) {
    		throw new InvalidConfigException('The $stacks argument should be provided as an array');
    	}
    	if ( ! $view instanceof yii\web\View) {
    		throw new InvalidConfigException('The $view argument should be provided as a yii\web\View');
    	}
    	foreach( $stacks as $name => $definition) {
    		$view->registerJs('var '.$name.' = '.Json::encode($definition).';');
    	}
    }
static public function registerStack($stacks,$view)
    {
    	if ( ! is_array($stacks)) {
    		throw new InvalidConfigException('The $stacks argument should be provided as an array');
    	}
    	if ( ! $view instanceof yii\web\View) {
    		throw new InvalidConfigException('The $view argument should be provided as a yii\web\View');
    	}
    	foreach( $stacks as $name => $definition) {
    		$view->registerJs('var '.$name.' = '.Json::encode($definition).';');
    	}
    }
static public function registerStack ( $ stacks , $ view ) { if ( ! is_array ( $ stacks ) ) { throw new InvalidConfigException ( 'The $stacks argument should be provided as an array' ) ; } if ( ! $ view instanceof yii \ web \ View ) { throw new InvalidConfigException ( 'The $view argument should be provided as a yii\web\View' ) ; } foreach ( $ stacks as $ name => $ definition ) { $ view -> registerJs ( 'var ' . $ name . ' = ' . Json :: encode ( $ definition ) . ';' ) ; } }
Register a set of stacks so they are available to PNotify widgets.

The stacks definitions should be passed as an associative array where keys are
the stack name, and value is the stak value.
<pre>
[
'stack_nam_1' => [
'dir1' => 'down',
'dir2' => 'right',
'push' => 'top'
],
'stack_nam_2' => [
'dir1' => 'down',
'dir2' => 'right',
'push' => 'top'
]
]
</pre>
@param array $stack definition of stacks
@throws InvalidConfigException
Register a set of stacks so they are available to PNotify widgets .