本文整理汇总了PHP中GridView::setView方法的典型用法代码示例。如果您正苦于以下问题:PHP GridView::setView方法的具体用法?PHP GridView::setView怎么用?PHP GridView::setView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GridView
的用法示例。
在下文中一共展示了GridView::setView方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __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);
}
示例2: __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);
}
示例3: __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);
}
示例4: __construct
public function __construct(CController $controller, MetadataView $listView)
{
$applicationName = ZurmoConfigurationUtil::getByModuleName('ZurmoModule', 'applicationName');
$header = new HeaderLinksView(array(), array(), $applicationName);
$flashMessageView = new FlashMessageView($controller);
$gridView = new GridView(4, 1);
$gridView->setView($header, 0, 0);
$gridView->setView($listView, 1, 0);
$gridView->setView($flashMessageView, 2, 0);
$gridView->setView(new FooterView(false), 3, 0);
$this->registerScripts();
parent::__construct($gridView);
}
示例5: renderContainingViews
/**
* @param WizardActiveForm $form
* @return string
*/
protected function renderContainingViews(WizardActiveForm $form)
{
$moduleForWorkflowWizardView = new ModuleForWorkflowWizardView($this->model, $form);
$triggersForWorkflowWizardView = new TriggersForWorkflowWizardView($this->model, $form, true);
$actionsForWorkflowWizardView = new ActionsForWorkflowWizardView($this->model, $form, true);
$emailMessagesForWorkflowWizardView = new EmailMessagesForWorkflowWizardView($this->model, $form, true);
$generalDataForWorkflowWizardView = new GeneralDataForWorkflowWizardView($this->model, $form, true);
$gridView = new GridView(5, 1);
$gridView->setView($moduleForWorkflowWizardView, 0, 0);
$gridView->setView($triggersForWorkflowWizardView, 1, 0);
$gridView->setView($actionsForWorkflowWizardView, 2, 0);
$gridView->setView($emailMessagesForWorkflowWizardView, 3, 0);
$gridView->setView($generalDataForWorkflowWizardView, 4, 0);
return $gridView->render();
}
示例6: renderContainingViews
/**
* @param WizardActiveForm $form
* @return string
*/
protected function renderContainingViews(WizardActiveForm $form)
{
$moduleForReportWizardView = new ModuleForReportWizardView($this->model, $form);
$filtersForReportWizardView = new FiltersForReportWizardView($this->model, $form, true);
$displayAttributesForReportWizardView = new DisplayAttributesForReportWizardView($this->model, $form, true);
$orderBysForReportWizardView = new OrderBysForReportWizardView($this->model, $form, true);
$generalDataForReportWizardView = new GeneralDataForReportWizardView($this->model, $form, true);
$gridView = new GridView(5, 1);
$gridView->setView($moduleForReportWizardView, 0, 0);
$gridView->setView($filtersForReportWizardView, 1, 0);
$gridView->setView($displayAttributesForReportWizardView, 2, 0);
$gridView->setView($orderBysForReportWizardView, 3, 0);
$gridView->setView($generalDataForReportWizardView, 4, 0);
return $gridView->render();
}
示例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
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);
}
示例9: 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;
}
示例10: 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());
}
示例11: actionDashboardDetails
public function actionDashboardDetails()
{
$params = array('controllerId' => $this->getId(), 'moduleId' => $this->getModule()->getId());
$gridViewId = 'notUsed';
$pageVar = 'notUsed';
$introCookieValue = Yii::app()->request->cookies[MarketingDashboardIntroView::resolveCookieId()];
$actionBarView = new SecuredActionBarForMarketingSearchAndListView('default', 'marketing', new EmailTemplate(), $gridViewId, $pageVar, false, 'MarketingDashboardLink');
$actionBarView->setIntroCookieValue($introCookieValue);
$introView = new MarketingDashboardIntroView($introCookieValue);
$marketingDashboardView = new MarketingDashboardView($this->getId(), $this->getModule()->getId(), 'MarketingDashboard', $params);
$marketingDashboardView->setCssClasses(array('clearfix'));
//todo: don't show introView if hidden
$gridView = new GridView(3, 1);
$gridView->setView($actionBarView, 0, 0);
$gridView->setView($introView, 1, 0);
$gridView->setView($marketingDashboardView, 2, 0);
$breadcrumbLinks = static::getDashboardBreadcrumbLinks();
$view = new MarketingPageView(MarketingDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $gridView, $breadcrumbLinks, 'MarketingBreadCrumbView'));
echo $view->render();
}
示例12: actionSequentialProcess
/**
* Example of a sequential process.
* @see TestCompleteSequentialProcessView
* @see TestSequentialProcess
* @param string $step
*/
function actionSequentialProcess($step)
{
if (isset($_GET['nextParams'])) {
$nextParams = $_GET['nextParams'];
} else {
$nextParams = null;
}
Yii::import('application.core.tests.unit.models.*');
Yii::import('application.core.tests.unit.components.*');
Yii::import('application.core.tests.unit.views.*');
assert('$step == null || is_string($step)');
assert('$nextParams == null || is_array($nextParams)');
//////Do setup logic here if needed
$a = new A();
$b = new B();
$sequentialProcess = new TestSequentialProcess($a, $b);
$sequentialProcess->run($step, $nextParams);
$nextStep = $sequentialProcess->getNextStep();
$route = $this->getModule()->getId() . '/' . $this->getId() . '/sequentialProcess';
if ($sequentialProcess->isComplete()) {
//////Do completion logic here if needed
$sequenceView = new TestCompleteSequentialProcessView($a, $b);
} else {
$sequenceView = SequentialProcessViewFactory::makeBySequentialProcess($sequentialProcess, $route);
}
if ($step == null) {
$gridView = new GridView(2, 1);
$titleBarView = new TitleBarView('Zurmo', 'Test Sequential Process');
$wrapperView = new SequentialProcessContainerView($sequenceView, $sequentialProcess->getAllStepsMessage());
$gridView->setView($titleBarView, 0, 0);
$gridView->setView($wrapperView, 1, 0);
$view = new ZurmoConfigurationPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $gridView));
} else {
$view = new AjaxPageView($sequenceView);
}
echo $view->render();
}
示例13: __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);
}
示例14: renderLeftAndRightGridViewContent
protected function renderLeftAndRightGridViewContent($leftTopView, $leftBottomView, $rightTopView, $renderRightSide)
{
assert('$leftTopView instanceof View');
assert('$leftBottomView instanceof View');
assert('$rightTopView instanceof View || $rightTopView == null');
assert('is_bool($renderRightSide)');
$actionView = new ActionBarForUserEditAndDetailsView($this->controllerId, $this->moduleId, $this->params['relationModel'], 'DetailsLink');
$content = $actionView->render();
$leftVerticalGridView = new GridView(2, 1);
$leftVerticalGridView->setView($leftTopView, 0, 0);
$leftVerticalGridView->setView($leftBottomView, 1, 0);
$content .= $leftVerticalGridView->render();
if ($renderRightSide) {
$rightVerticalGridView = new GridView(1, 1);
$rightVerticalGridView->setView($rightTopView, 0, 0);
$content .= $rightVerticalGridView->render();
}
return $content;
}
示例15: renderLeftAndRightGridViewContent
/**
* @param $leftTopView
* @param $leftBottomView
* @param $rightTopView
* @param bool $renderRightSide
* @return string
*/
protected function renderLeftAndRightGridViewContent($leftTopView, $leftBottomView, $rightTopView, $renderRightSide)
{
assert('$leftTopView instanceof View');
assert('$leftBottomView instanceof View');
assert('$rightTopView instanceof View || $rightTopView == null');
assert('is_bool($renderRightSide)');
$actionView = new ActionBarForUserEditAndDetailsView($this->controllerId, $this->moduleId, $this->params['relationModel'], 'UserDetailsMenu');
$content = $actionView->render();
$leftVerticalGridView = new GridView(2, 1);
$leftVerticalGridView->setView($leftTopView, 0, 0);
$leftVerticalGridView->setView($leftBottomView, 1, 0);
$content .= $leftVerticalGridView->render();
if ($renderRightSide) {
$this->setCssClasses(array_merge($this->getCssClasses(), array('double-column')));
$rightVerticalGridView = new GridView(1, 1);
$rightVerticalGridView->setView($rightTopView, 0, 0);
$content .= $rightVerticalGridView->render();
} else {
$this->setCssClasses(array_merge($this->getCssClasses(), array('single-column')));
}
return $content;
}