本文整理匯總了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;
}