本文整理汇总了PHP中TbHtml::heroUnit方法的典型用法代码示例。如果您正苦于以下问题:PHP TbHtml::heroUnit方法的具体用法?PHP TbHtml::heroUnit怎么用?PHP TbHtml::heroUnit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TbHtml
的用法示例。
在下文中一共展示了TbHtml::heroUnit方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: if
<?php
/* @var $this SiteController */
$this->pageTitle=Yii::app()->name;
?>
<?php //echo TbHtml::pageHeader('', Yii::t('strings',CHtml::encode(Yii::app()->name)))?>
<?php if(!empty(Yii::app()->user->getState('pending-decisions-message'))) : ?>
<?php echo TbHtml::alert(TbHtml::ALERT_COLOR_INFO, Yii::app()->user->getState('pending-decisions-message'),array('style'=>'position:fixed;width:50%;height:200px;margin-left:15%;margin-right:15%')); ?>
<?php Yii::app()->user->setState('pending-decisions-message','');?>
<?php endif; ?>
<?php $aboutContent =
TbHtml::link('',$this->createUrl('//page/update',array('id'=>$model->id)),array('class'=>TbHtml::ICON_PENCIL)).
"
<h3>$model->title</h3>
<div style='font-size:14px;height:150px;'>
$model->body
</div>
" ;
?>
<?php echo TbHtml::heroUnit(null,$aboutContent);?>
示例2: testHeroUnit
public function testHeroUnit()
{
$I = $this->codeGuy;
$html = TbHtml::heroUnit('Heading text', 'Content text', array('class' => 'div', 'headingOptions' => array('class' => 'heading')));
$hero = $I->createNode($html, 'div.hero-unit');
$I->seeNodeCssClass($hero, 'div');
$I->seeNodeText($hero, 'Content text');
$h1 = $hero->filter('h1');
$I->seeNodeCssClass($h1, 'heading');
$I->seeNodeText($h1, 'Heading text');
}
示例3: run
/**
* Runs the widget.
*/
public function run()
{
echo TbHtml::heroUnit($this->heading, $this->content, $this->htmlOptions);
}
示例4: array
</section>
<!-- Typography
================================================== -->
<section id="typography">
<div class="page-header">
<h1>Typography</h1>
</div>
<h2>Hero unit</h2>
<div class="bs-docs-example">
<?php
echo TbHtml::heroUnit('Hello, world!', '<p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>' . TbHtml::button('Learn more', array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'size' => TbHtml::BUTTON_SIZE_LARGE)));
?>
</div>
<pre class="prettyprint linenums">
<?php echo TbHtml::heroUnit('Hello, world!', '...'); ?></pre>
<hr class="bs-docs-separator">
<h2>Page header</h2>
<div class="bs-docs-example">
<?php
echo TbHtml::pageHeader('Example page header', 'Subtext for header');
?>
</div>