Skip to content

Yii2 extension for embed JS with IDE checking or intellisense

Notifications You must be signed in to change notification settings

shqear93/yii2-embedjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

this is a fork package from mitrii/yii2-embedjs

Yii2 embed JS

Embed JS with IDE checking or intellisense

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"shqear/yii2-embedjs": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?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)

<?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(); ?>

About

Yii2 extension for embed JS with IDE checking or intellisense

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%