2017 © Pedro Peláez
 

yii2-extension yii2-embedjs

Embed JS with IDE checking or intellisense.

image

shqear/yii2-embedjs

Embed JS with IDE checking or intellisense.

  • Tuesday, April 24, 2018
  • by shqear93
  • Repository
  • 1 Watchers
  • 0 Stars
  • 35 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 3 % Grown

The README.md

this is a fork package from mitrii/yii2-embedjs, (*1)

Yii2 embed JS

Embed JS with IDE checking or intellisense, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist shqear/yii2-embedjs "*"

or add, (*5)

"shqear/yii2-embedjs": "*"

to the require section of your composer.json file., (*6)

Usage

Once the extension is installed, simply use it in your code by :, (*7)

<?php \shqear\widgets\Embedjs::begin(); ?>
<script type="text/javascript">
    console.log('Hello, world!');
</script>
<?php \shqear\widgets\Embedjs::end(); ?>

Or with 'position' option (The default option is POS_END), (*8)

<?php \shqear\widgets\Embedjs::begin(['position' => \yii\web\View::POS_READY]); ?>
<script type="text/javascript">
    console.log('Hello, world!');
</script>
<?php \shqear\widgets\Embedjs::end(); ?>

The Versions

24/04 2018

dev-master

9999999-dev

Embed JS with IDE checking or intellisense.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 javascript js block embed extended