2017 © Pedro Peláez
 

yii-extension yii-csol

Implement Object Literal methods for client script Yii

image

smak/yii-csol

Implement Object Literal methods for client script Yii

  • Thursday, July 21, 2016
  • by Smak
  • Repository
  • 1 Watchers
  • 0 Stars
  • 189 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Yii ClientScript ObjectLiteral

Using objects for organize your client script code. The implementation of the basic methods Object Literal for framework Yii CClientScript., (*1)

Read more about this: * Markup-based unobtrusive comprehensive DOM-ready execution * Show love to the object literal * Использование объектов для красивой структуры кода в JavaScript, (*2)

Installation

Composer, (*3)

composer require smak/yii-csol

Add to protected/config/main.php, (*4)

    'components' => array(
        ...
        'clientScript' => array(
            'class' => 'ext.yii-csol.YiiCSOL',
            'revisionFile' => 'clienscript.rev',
            'coreScriptPosition' => CClientScript::POS_END, // Optional. Required Yii >= 1.1.11
            'defaultScriptFilePosition' => CClientScript::POS_END // Optional. Required Yii >= 1.1.11
        ),
    )

API

YiiCSOL::registerScriptInit($module = null, $controller = null, $action = null, $position=self::POS_READY, $data = array())


Yii::app()->clientScript->registerScriptInit();

YiiCSOL::registerScriptData($name, $data)


Yii::app()->clientScript->registerScriptData();

YiiCSOL::registerCssFile($url, $media='')


Yii::app()->clientScript->registerCssFile();

YiiCSOL::registerScriptFile($url, $position = null, $isRevision = true)


Yii::app()->clientScript->registerScriptFile();

YiiCSOL::getRevision()


Yii::app()->clientScript->getRevision();

The Versions

21/07 2016

dev-master

9999999-dev

Implement Object Literal methods for client script Yii

  Sources   Download

GPL

by Alexander Sobolevskiy

yii clientscript

21/07 2016

1.0.1

1.0.1.0

Implement Object Literal methods for client script Yii

  Sources   Download

GPL

by Alexander Sobolevskiy

yii clientscript

20/02 2015

1.0.0

1.0.0.0

Implement Object Literal methods for client script Yii

  Sources   Download

GPL

by Alexander Sobolevskiy

yii clientscript