本文整理汇总了PHP中BlockController::getCssClassName方法的典型用法代码示例。如果您正苦于以下问题:PHP BlockController::getCssClassName方法的具体用法?PHP BlockController::getCssClassName怎么用?PHP BlockController::getCssClassName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlockController
的用法示例。
在下文中一共展示了BlockController::getCssClassName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* @param BlockController $block
* @param DecoratorParams $params
*
* @return mixed
*/
public function render(BlockController $block, DecoratorParams $params)
{
$title = $block->getTitle();
$header = '';
if ($title) {
$header = '<div class="panel-header"><div class="panel-header"><span>' . $title . '</span></div></div>';
}
return '<div class="panel ' . $params->get('scheme') . ' ' . $block->getCssClassName() . '">' . $header . '<div class="panel-body">' . $block->getContent() . '</div></div>';
}
示例2: render
/**
* @param BlockController $block
* @param DecoratorParams $params
*
* @return mixed
*/
public function render(BlockController $block, DecoratorParams $params)
{
$title = $block->getTitle();
$header = '';
if ($title) {
$header = '<div class="unit-header"><div class="unit-title"><span>' . $title . '</span></div></div>';
}
return '<div class="unit ' . $block->getCssClassName() . '">' . $header . '<div class="unit-content">' . $block->getContent() . '</div></div>';
}
示例3: testBlock
public function testBlock()
{
$block = new BlockController();
$block->setIcon('sample_icon');
$this->assertEquals('sample_icon', $block->getIcon());
$block->setTitle('sample_title');
$this->assertEquals('sample_title', $block->getTitle());
$block->setBadge('4');
$this->assertEquals('4', $block->getBadge());
$this->assertEquals('kendo-layout', $block->getCssClassName());
$block->setNoRender(false);
$this->assertFalse($block->isNoRender());
$block->setNoRender(true);
$this->assertTrue($block->isNoRender());
}