本文整理汇总了PHP中GridView类的典型用法代码示例。如果您正苦于以下问题:PHP GridView类的具体用法?PHP GridView怎么用?PHP GridView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GridView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(View $view)
{
$horizontalGridView = new GridView(1, 1);
$horizontalGridView->setView($view, 0, 0);
$this->verticalGridView = new GridView(1, 1);
$this->verticalGridView->setView($horizontalGridView, 0, 0);
}
示例2: makeExternalViewForCurrentUser
public static function makeExternalViewForCurrentUser(View $containedView)
{
$horizontalGridView = new GridView(1, 1);
$containedView->setCssClasses(array_merge($containedView->getCssClasses(), array('AppContent')));
$horizontalGridView->setView($containedView, 0, 0);
$verticalGridView = new GridView(1, 1);
$verticalGridView->setView($horizontalGridView, 0, 0);
return $verticalGridView;
}
示例3: renderListViews
/**
* Render a group of lists that contains the search result from GlobalList
*
*/
protected function renderListViews()
{
$rows = count($this->views);
$gridView = new GridView($rows, 1);
$row = 0;
foreach ($this->views as $view) {
$gridView->setView($view, $row++, 0);
}
return ZurmoHtml::tag('div', array('id' => 'MixedModelsMultipleListsView'), $gridView->render());
}
示例4: __construct
public function __construct(CController $controller, SplashView $splashView)
{
$applicationName = ZurmoConfigurationUtil::getByModuleName('ZurmoModule', 'applicationName');
$header = new HeaderLinksView(array(), array());
$gridView = new GridView(3, 1);
$gridView->setView($header, 0, 0);
$gridView->setView($splashView, 1, 0);
$gridView->setView(new FooterView(), 2, 0);
parent::__construct($gridView);
}
示例5: __construct
/**
* @param CController $controller
* @param MetadataView $listView
*/
public function __construct(CController $controller, MetadataView $listView)
{
$flashMessageView = new FlashMessageView($controller);
$gridView = new GridView(3, 1);
$gridView->setView($listView, 0, 0);
$gridView->setView($flashMessageView, 1, 0);
$gridView->setView(new FooterView(), 2, 0);
$this->registerScripts();
parent::__construct($gridView);
}
示例6: __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(false), 2, 0);
$this->registerScripts();
parent::__construct($gridView);
}
示例7: actionDashboardDetails
public function actionDashboardDetails()
{
$params = array('controllerId' => $this->getId(), 'moduleId' => $this->getModule()->getId());
$gridViewId = 'notUsed';
$pageVar = 'notUsed';
$introView = new MarketingDashboardIntroView(get_class($this->getModule()));
$actionBarView = new SecuredActionBarForMarketingSearchAndListView('default', 'marketing', new EmailTemplate(), $gridViewId, $pageVar, false, 'MarketingDashboardLink', $introView);
$marketingDashboardView = new MarketingDashboardView($this->getId(), $this->getModule()->getId(), 'MarketingDashboard', $params);
$marketingDashboardView->setCssClasses(array('clearfix'));
$gridView = new GridView(2, 1);
$gridView->setView($actionBarView, 0, 0);
$gridView->setView($marketingDashboardView, 1, 0);
$breadcrumbLinks = static::getDashboardBreadcrumbLinks();
$view = new MarketingPageView(MarketingDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $gridView, $breadcrumbLinks, 'MarketingBreadCrumbView'));
echo $view->render();
}
示例8: __construct
/**
* @param string $controllerId
* @param string $moduleId
* @param array $settingsMenuItems
* @param array $userMenuItems
* @param array $shortcutsCreateMenuItems
* @param array $moduleNamesAndLabels
* @param string $sourceUrl
* @param string $applicationName
*/
public function __construct($controllerId, $moduleId, $settingsMenuItems, $userMenuItems, $shortcutsCreateMenuItems, $moduleNamesAndLabels, $sourceUrl, $applicationName)
{
assert('is_string($controllerId)');
assert('is_string($moduleId)');
assert('is_array($settingsMenuItems)');
assert('is_array($userMenuItems)');
assert('is_array($shortcutsCreateMenuItems)');
assert('is_array($moduleNamesAndLabels)');
assert('is_string($sourceUrl)');
assert('is_string($applicationName) || $applicationName == null');
$shortcutsCreateMenuView = new ShortcutsCreateMenuView($controllerId, $moduleId, $shortcutsCreateMenuItems);
$this->verticalGridView = new GridView(2, 1);
$this->verticalGridView->setView(new HeaderLinksView($settingsMenuItems, $userMenuItems, $applicationName), 0, 0);
$globalSearchAndShortcutsCreateMenuView = new GlobalSearchAndShortcutsCreateMenuView($moduleNamesAndLabels, $sourceUrl, $shortcutsCreateMenuView);
$horizontalGridView = new GridView(1, 1);
$horizontalGridView->setView($globalSearchAndShortcutsCreateMenuView, 0, 0);
$this->verticalGridView->setView($horizontalGridView, 1, 0);
}
示例9: __construct
public function __construct($controllerId, $moduleId, $module, ModuleForm $moduleForm, $title)
{
parent::__construct(2, 1);
$this->setView(new ActionBarForDesignerModuleView($controllerId, $moduleId, $module, 'DesignerGeneralMenu'), 0, 0);
$moduleEditViewClassName = get_class($module) . 'EditView';
$this->setView(new $moduleEditViewClassName($controllerId, $moduleId, $moduleForm, $title), 1, 0);
}
示例10: __construct
public function __construct($controllerId, $moduleId, User $user, ConfigurationForm $formModel)
{
parent::__construct(2, 1);
$this->setView(new ActionBarForUserEditAndDetailsView($controllerId, $moduleId, $user, 'UserConfigurationMenu'), 0, 0);
$title = strval($user) . ': ' . Zurmo::t('ConfigurationModule', 'Configuration');
$this->setView(new UserConfigurationEditView($controllerId, $moduleId, $formModel, $title), 1, 0);
}
示例11: __construct
public function __construct($controllerId, $moduleId)
{
parent::__construct(2, 1);
$moduleDisplayName = LeadsModule::getModuleLabelByTypeAndLanguage('Plural');
$this->setView(new ActionBarForDesignerModuleView($controllerId, $moduleId, Yii::app()->getModule('leads'), 'DesignerFieldsLink'), 0, 0);
$this->setView(new AttributesRedirectToContactsView($controllerId, $moduleId), 1, 0);
}
示例12: __construct
public function __construct($controllerId, $moduleId, UserPasswordForm $userForm)
{
parent::__construct(2, 1);
$this->setView(new ActionBarForUserEditAndDetailsView($controllerId, $moduleId, $userForm->getModel(), 'ChangePasswordMenu'), 0, 0);
$title = strval($userForm) . ': ' . Zurmo::t('UsersModule', 'Change Password');
$this->setView(new UserChangePasswordView($controllerId, $moduleId, $userForm, $title), 1, 0);
}
示例13: __construct
public function __construct($controllerId, $moduleId, User $user, UserNotificationConfigurationForm $notificationConfigurationForm)
{
parent::__construct(2, 1);
$this->setView(new ActionBarForUserEditAndDetailsView($controllerId, $moduleId, $user, 'UserConfigurationEditLink'), 0, 0);
$title = strval($user) . ': ' . Zurmo::t('Core', 'Notifications Configuration');
$this->setView(new UserNotificationConfigurationEditView('Edit', $controllerId, $moduleId, $notificationConfigurationForm, $title), 1, 0);
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:7,代码来源:UserActionBarAndNotificationConfigurationEditView.php
示例14: __construct
public function __construct($controllerId, $moduleId, RedBeanModel $model, $moduleName)
{
parent::__construct(2, 1);
$this->setView(new ActionBarForUserEditAndDetailsView($controllerId, $moduleId, $model, 'UserEditMenu'), 0, 0);
$editViewClassName = get_class($model) . 'EditView';
$this->setView(new $editViewClassName($controllerId, $moduleId, $model), 1, 0);
}
示例15: init
public function init()
{
parent::init();
if ($this->rankKey === null) {
if ($this->dataProvider->getItemCount() > 0) {
$data = $this->dataProvider->data[0];
$keys = array_keys($data instanceof CActiveRecord ? $data->attributes : $data);
$this->rankKey = isset($data['rank']) ? 'rank' : $keys[0];
}
}
$hasRankColumn = false;
foreach ($this->columns as $column) {
if ($column instanceof RankColumn) {
$hasRankColumn = true;
break;
}
}
if ($hasRankColumn === false) {
array_unshift($this->columns, Yii::createComponent(array('class' => 'RankColumn', 'value' => '$displayRank', 'header' => Yii::t('statistics', 'Rank')), $this));
}
$this->lastRank = $this->rank;
if ($this->count != $this->rank && $this->rankKey !== null) {
$this->rank++;
if ($this->dataProvider->getItemCount() > 0) {
$data = $this->dataProvider->data[0];
$this->lastRankValue = CHtml::value($data, $this->rankKey);
}
}
}