Class ELipsum
ELipsum widget
It generate simply dummy text.
Usage as widget:
$this->widget('ext.yiiext.widgets.ELipsum',array( 'paragraphs'=>2, 'words'=>50, ));
Usage static methods:
Yii::import('ext.yiiext.widgets.lipsum.ELipsum'); echo ELipsum::paragraphs(2); echo ELipsum::words(100);
Usage in models:
public function rules() { Yii::import('ext.yiiext.widgets.lipsum.ELipsum'); return array( array('content','default','value'=>ELipsum::paragraphs(),'on'=>'insert'), ); }
- CComponent
-
CBaseController
-
CWidget
-
ELipsum
License: http://www.opensource.org/licenses/bsd-license.php
Author: Veaceslav Medvedev <slavcopost@gmail.com>
Version: 0.1
Located at yiiext/lipsum-widget/ELipsum.php
Methods summary
public
|
|
public static
string
|
#
paragraphs( integer $count = 0, integer $words = 0, boolean $loremIpsumFirst = true, string $wrapperTag = 'p' )
Generate paragraphs. |
public static
string
|
Methods inherited from CWidget
__construct()
,
actions()
,
getController()
,
getId()
,
getOwner()
,
getViewFile()
,
getViewPath()
,
init()
,
render()
,
setId()
Methods inherited from CBaseController
beginCache()
,
beginClip()
,
beginContent()
,
beginWidget()
,
createWidget()
,
endCache()
,
endClip()
,
endContent()
,
endWidget()
,
renderFile()
,
renderInternal()
,
widget()
Methods inherited from CComponent
__call()
,
__get()
,
__isset()
,
__set()
,
__unset()
,
asa()
,
attachBehavior()
,
attachBehaviors()
,
attachEventHandler()
,
canGetProperty()
,
canSetProperty()
,
detachBehavior()
,
detachBehaviors()
,
detachEventHandler()
,
disableBehavior()
,
disableBehaviors()
,
enableBehavior()
,
enableBehaviors()
,
evaluateExpression()
,
getEventHandlers()
,
hasEvent()
,
hasEventHandler()
,
hasProperty()
,
raiseEvent()
Magic methods summary
Properties summary
public
integer
|
$paragraphs |
#
the number of paragraphs. Set 0 (zero) to get random from 1 to 10 paragraphs. Defaults to 0. |
public
integer
|
$words |
#
the number of words per paragraph. Set 0 (zero) to get random from 5 to 100 words. Defaults to 0. |
public
boolean
|
$loremIpsumFirst |
#
which start with "Lorem ipsum dolor sit amet". Defaults to true. |
public
string
|
$paragraphTag |
#
the paragraph's wrapper tag. Defaults to 'p'. |
Properties inherited from CWidget
$actionPrefix
,
$skin
Magic properties inherited from CWidget
$controller
,
$id
,
$owner
,
$viewPath