Yii 1.1: aii-publish-register-behavior

Aii Publish Register Behavior extension supporting publishing and registering CSS and JS in easy way
1 follower

Resources

Documentation

Requirements

  • Yii 1.0 or above

Installation

  • Extract the release file under protected/extensions

Usage

See the following code example:

public function init()
    {
        parent::init( );
        if ( $this->mp3Folder === null )
            $this->mp3Folder = '{basePath}{/}mp3';
        $this->attachBehavior( 'pubMan', #publishManager
            array(
                'class' => 'AiiPublishRegisterBehavior',
                'cssPath' => false,
                'jsToRegister' => array( 'audio-player.js' ),
                'basePath' => dirname( __FILE__ ),          
                'jsPath' => '{assets}/js',
                'otherResToPublish' => array( 'mp3Folder' => $this->mp3Folder ),
        ) );
        $this->publishAll( );
        $this->registerAll( );
    }

Change Log

March 14, 2010

  • Initial release.

Match 19, 2010

  • Release 0.2.1
  • Fixed bug for publishing and registering CSS files when no other resources are regostered

Be the first person to leave a comment

Please to leave your comment.

Create extension
  • Yii Version: 1.1
  • License: New BSD License
  • Developed by: aztech
  • Category: Others
  • Votes: +1
  • Downloaded: 827 times
  • Created on: Mar 14, 2010
  • Last updated: Mar 19, 2010