本文整理匯總了PHP中ZurmoDefaultViewUtil::makeAuthorizationViewForCurrentUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP ZurmoDefaultViewUtil::makeAuthorizationViewForCurrentUser方法的具體用法?PHP ZurmoDefaultViewUtil::makeAuthorizationViewForCurrentUser怎麽用?PHP ZurmoDefaultViewUtil::makeAuthorizationViewForCurrentUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ZurmoDefaultViewUtil
的用法示例。
在下文中一共展示了ZurmoDefaultViewUtil::makeAuthorizationViewForCurrentUser方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: actionUserInterface
public function actionUserInterface($type = null)
{
if (!Group::isUserASuperAdministrator(Yii::app()->user->userModel)) {
throw new NotSupportedException();
}
if ($type == null) {
$demoView = new MenuUserInterfaceDemoView();
$view = new ZurmoConfigurationPageView(ZurmoDefaultAdminViewUtil::makeStandardViewForCurrentUser($this, $demoView));
echo $view->render();
} elseif ($type == MenuUserInterfaceDemoView::STANDARD_VIEW) {
$demoView = new StandardUserInterfaceDemoView();
$demoView->message = 'Standard View';
$view = new ZurmoConfigurationPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $demoView));
echo $view->render();
} elseif ($type == MenuUserInterfaceDemoView::STANDARD_BREADCRUMBS_VIEW) {
$breadCrumbLinks = array('Breadcrumb 1' => array('/zurmo/demo/userInterface'), 'Breadcrumb 2');
$demoView = new StandardUserInterfaceDemoView();
$demoView->message = 'Standard View with BreadCrumbs';
$view = new ZurmoConfigurationPageView(ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $demoView, $breadCrumbLinks, 'SettingsBreadCrumbView'));
echo $view->render();
} elseif ($type == MenuUserInterfaceDemoView::GRACEFUL_ERROR_VIEW) {
$demoView = new StandardUserInterfaceDemoView();
$demoView->message = 'Graceful Error View';
$view = new ZurmoConfigurationPageView(ZurmoDefaultViewUtil::makeErrorViewForCurrentUser($this, $demoView));
echo $view->render();
} elseif ($type == MenuUserInterfaceDemoView::UNEXPECTED_ERROR_VIEW) {
$view = new ErrorPageView('Unexpected error view');
echo $view->render();
} elseif ($type == MenuUserInterfaceDemoView::AUTHORIZATION_VIEW) {
$demoView = new StandardUserInterfaceDemoView();
$demoView->message = 'Authorization View';
$view = new ZurmoConfigurationPageView(ZurmoDefaultViewUtil::makeAuthorizationViewForCurrentUser($this, $demoView));
$view->setCssClasses(array_merge($view->getCssClasses(), array('ZurmoAuthorizationPageView')));
echo $view->render();
} elseif ($type == MenuUserInterfaceDemoView::CONTACT_FORM_EXTERNAL_VIEW) {
$containedView = new ContactExternalEditAndDetailsView('Edit', $this->getId(), $this->getModule()->getId(), new ContactWebFormsModelForm(new Contact()), ContactExternalEditAndDetailsView::getMetadata());
$view = new ContactWebFormsExternalPageView(ZurmoExternalViewUtil::makeExternalViewForCurrentUser($containedView));
echo $view->render();
} elseif ($type == MenuUserInterfaceDemoView::MARKETING_LISTS_EXTERNAL_PREVIEW_VIEW) {
$splashView = new MarketingListsExternalActionsPreviewView();
$view = new MarketingListsExternalActionsPageView($this, $splashView);
echo $view->render();
} elseif ($type == MenuUserInterfaceDemoView::MARKETING_LISTS_MANAGE_SUBSCRIPTIONS_VIEW) {
$marketingListMember = MarketingListMember::getSubset(null, 0, 1);
$marketingLists = MarketingList::getByUnsubscribedAndAnyoneCanSubscribe($marketingListMember[0]->contact->id);
$listView = new MarketingListsManageSubscriptionsListView($this->getId(), $this->getModule()->getId(), $marketingLists, -100, -100, -100, 'notUsed');
$view = new MarketingListsManageSubscriptionsPageView($this, $listView);
echo $view->render();
} elseif ($type == MenuUserInterfaceDemoView::MOBILE_HEADER_VIEW) {
Yii::app()->userInterface->setSelectedUserInterfaceType(UserInterface::MOBILE);
$demoView = new StandardUserInterfaceDemoView();
$demoView->message = 'Standard View';
$view = new ZurmoConfigurationPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $demoView));
echo $view->render();
} else {
throw new NotSupportedException();
}
}