本文整理汇总了PHP中GridView::setCssClasses方法的典型用法代码示例。如果您正苦于以下问题:PHP GridView::setCssClasses方法的具体用法?PHP GridView::setCssClasses怎么用?PHP GridView::setCssClasses使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GridView
的用法示例。
在下文中一共展示了GridView::setCssClasses方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(CController $controller, CFormModel $formModel, $extraHeaderContent = null)
{
assert('is_string($extraHeaderContent) || $extraHeaderContent == null');
$loginview = new LoginView($controller, $formModel, $extraHeaderContent);
$loginview->setCssClasses(array('clearfix', 'background-' . mt_rand(1, 6)));
$flashMessageView = new FlashMessageView($controller);
$gridView = new GridView(3, 1);
$gridView->setView($flashMessageView, 0, 0);
$gridView->setView($loginview, 1, 0);
$gridView->setView(new FooterView(), 2, 0);
$gridView->setCssClasses(array('login-container'));
$this->registerScripts();
parent::__construct($gridView);
}
示例2: makeErrorViewForCurrentUser
/**
* Given a contained view, construct the gridview
* used by the zurmo page view for errors.
* @param View $containedView
*/
public static function makeErrorViewForCurrentUser(CController $controller, View $containedView)
{
$aVerticalGridView = new GridView(1, 1);
$aVerticalGridView->setCssClasses(array('AppNavigation', 'clearfix'));
//navigation left column
$aVerticalGridView->setView(static::makeMenuView($controller), 0, 0);
$horizontalGridView = new GridView(2, 1);
$horizontalGridView->setCssClasses(array('AppContainer', 'clearfix'));
$horizontalGridView->setView($aVerticalGridView, 0, 0);
$containedView->setCssClasses(array_merge($containedView->getCssClasses(), array('AppContent', 'ErrorView')));
//the app itself to the right
$horizontalGridView->setView($containedView, 1, 0);
$verticalGridView = new GridView(3, 1);
$verticalGridView->setView(static::makeHeaderView($controller), 0, 0);
$verticalGridView->setView($horizontalGridView, 1, 0);
$verticalGridView->setView(static::makeFooterView(), 2, 0);
return $verticalGridView;
}