golles/yii2-widgets

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (dev-master) of this package.

My Yii2 widgets that I want to share with the world

Installs: 161

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 0

Type:yii2-extension

dev-master 2015-03-04 17:55 UTC

This package is not auto-updated.

Last update: 2021-09-04 00:21:32 UTC


README

This repository contains my widgets for the Yii2 Framework.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist golles/yii2-widgets "*"

or add

"golles/yii2-widgets": "*"

to the require section of your composer.json file.

Usage

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

IframeAutoHeight

This widget generates an iframe object in the dom that adjusts it's height automatically based on the height of the iframes content. The result is that it looks like the iframe content is normal page content, it won't look like there is an iframe at all.

Note, this only works on iframes on the same domain.

echo IframeAutoHeight::widget([
    'intervalTime' => 500,
    'noIframeSupportText' => 'Your browser does not support iframes.',
    'iframeOptions' => [
        'id' => 'webalizerIframe',
        'src' => 'http://mydomain.com/iframe.html',
        'width' => '100%',
        'height' => '500px',
        'frameborder' => '0',
        'scrolling' => 'no'
                       
     ]
]);