本文整理汇总了PHP中ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser方法的典型用法代码示例。如果您正苦于以下问题:PHP ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser方法的具体用法?PHP ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser怎么用?PHP ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZurmoDefaultViewUtil
的用法示例。
在下文中一共展示了ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
}
示例2: actionEdit
public function actionEdit($id, $redirectUrl = null)
{
$conversation = Conversation::getById(intval($id));
$conversationsMashableInboxUrl = Yii::app()->createUrl('mashableInbox/default/list', array('modelClassName' => 'Conversation'));
$breadcrumbLinks = array(Zurmo::t('ConversationsModule', 'Conversations') => $conversationsMashableInboxUrl, StringUtil::getChoppedStringContent(strval($conversation), 25) => array('default/details', 'id' => $id), Zurmo::t('ConversationModule', 'Edit'));
$conversation = Conversation::getById(intval($id));
ControllerSecurityUtil::resolveAccessCanCurrentUserWriteModel($conversation);
$editView = new ConversationEditView($this->getId(), $this->getModule()->getId(), $this->attemptToSaveModelFromPost($conversation), strval($conversation));
$view = new ConversationsPageView(ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $editView, $breadcrumbLinks, 'ConversationBreadCrumbView'));
echo $view->render();
}
示例3: actionList
public function actionList()
{
$pageSize = new resolveActiveForCurrentUserByType('listPageSize', get_class($this->getModule()));
$savedReport = new SavedReport(false);
$searchForm = new ReportsSearchForm($savedReport);
$listAttributesSelector = new ListAttributesSelector('ReportsListView', get_class($this->getModule()));
$searchForm->setListAttributesSelector($listAttributesSelector);
$dataProvider = $this->resolveSearchDataProvider($searchForm, $pageSize, null, 'ReportsSearchView');
$title = Zurmo::t('ReportsModule', 'Reports');
$breadCrumbLinks = array($title);
if (isset($_GET['ajax']) && $_GET['ajax'] == 'list-view') {
$mixedView = $this->makeListView($searchForm, $dataProvider);
$view = new ReportsPageView($mixedView);
} else {
$mixedView = $this->makeActionBarSearchAndListView($searchForm, $dataProvider, 'SecuredActionBarForReportsSearchAndListView');
$view = new ReportsPageView(ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $mixedView, $breadCrumbLinks, 'ReportBreadCrumbView'));
}
echo $view->render();
}
示例4: actionMassDelete
/**
* Action for displaying a mass delete form and also action when that form is first submitted.
* When the form is submitted, in the event that the quantity of models to delete is greater
* than the pageSize, then once the pageSize quantity has been reached, the user will be
* redirected to the makeMassDeleteProgressView.
* In the mass delete progress view, a javascript refresh will take place that will call a refresh
* action, usually makeMassDeleteProgressView.
* If there is no need for a progress view, then a flash message will be added and the user will
* be redirected to the list view for the model. A flash message will appear providing information
* on the delete records.
* @see Controller->makeMassDeleteProgressView
* @see Controller->processMassDelete
* @see
*/
public function actionMassDelete()
{
$params = LabelUtil::getTranslationParamsForAllModules();
$title = Zurmo::t('ProductsModule', 'Mass Delete ProductsModulePluralLabel', $params);
$breadCrumbLinks = array($title);
$pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('massDeleteProgressPageSize');
$product = new Product(false);
$activeAttributes = $this->resolveActiveAttributesFromMassDeletePost();
$dataProvider = $this->getDataProviderByResolvingSelectAllFromGet(new ProductsSearchForm($product), $pageSize, Yii::app()->user->userModel->id, null, 'ProductsSearchView');
$selectedRecordCount = $this->getSelectedRecordCountByResolvingSelectAllFromGet($dataProvider);
$product = $this->processMassDelete($pageSize, $activeAttributes, $selectedRecordCount, 'ProductsPageView', $product, ProductsModule::getModuleLabelByTypeAndLanguage('Plural'), $dataProvider);
$massDeleteView = $this->makeMassDeleteView($product, $activeAttributes, $selectedRecordCount, ProductsModule::getModuleLabelByTypeAndLanguage('Plural'));
$view = new ProductsPageView(ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $massDeleteView, $breadCrumbLinks, 'ProductBreadCrumbView'));
echo $view->render();
}
示例5: actionSelectType
public function actionSelectType()
{
$breadCrumbLinks = array(Zurmo::t('ReportsModule', 'Select Report Type'));
$view = new ReportsPageView(ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, new ReportWizardTypesGridView(), $breadCrumbLinks, 'ReportBreadCrumbView'));
echo $view->render();
}
示例6: actionMassDelete
/**
* Action for displaying a mass delete form and also action when that form is first submitted.
* When the form is submitted, in the event that the quantity of models to delete is greater
* than the pageSize, then once the pageSize quantity has been reached, the user will be
* redirected to the makeMassDeleteProgressView.
* In the mass delete progress view, a javascript refresh will take place that will call a refresh
* action, usually makeMassDeleteProgressView.
* If there is no need for a progress view, then a flash message will be added and the user will
* be redirected to the list view for the model. A flash message will appear providing information
* on the delete records.
* @see Controller->makeMassDeleteProgressView
* @see Controller->processMassDelete
* @see
*/
public function actionMassDelete()
{
$params = LabelUtil::getTranslationParamsForAllModules();
$title = Zurmo::t('ProductTemplatesModule', 'Mass Delete ProductTemplatesModulePluralLabel', $params);
$breadcrumbLinks = array($title);
$pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('massDeleteProgressPageSize');
$productTemplate = new ProductTemplate(false);
$activeAttributes = $this->resolveActiveAttributesFromMassDeletePost();
$dataProvider = $this->getDataProviderByResolvingSelectAllFromGet(new ProductTemplatesSearchForm($productTemplate), $pageSize, Yii::app()->user->userModel->id, null, 'ProductTemplatesSearchView');
$selectedRecordCount = $this->getSelectedRecordCountByResolvingSelectAllFromGet($dataProvider);
$productTemplate = $this->processMassDelete($pageSize, $activeAttributes, $selectedRecordCount, 'ProductTemplatesPageView', $productTemplate, Zurmo::t('ProductTemplatesModule', 'ProductTemplatesModulePluralLabel', $params), $dataProvider);
if ($productTemplate === false) {
Yii::app()->user->setFlash('notification', Zurmo::t('ProductTemplatesModule', 'One of the ProductTemplatesModuleSingularLowerCaseLabel selected is associated to products in the system hence could not be deleted', $params));
$this->redirect(Zurmo::app()->request->getUrlReferrer());
} else {
$massDeleteView = $this->makeMassDeleteView($productTemplate, $activeAttributes, $selectedRecordCount, Zurmo::t('ProductTemplatesModule', 'ProductTemplatesModulePluralLabel', $params), 'ProductTemplatesMassDeleteView');
$view = new ProductTemplatesPageView(ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $massDeleteView, $breadcrumbLinks, 'ProductBreadCrumbView'));
echo $view->render();
}
}
示例7: makeViewWithBreadcrumbsForCurrentUser
public static function makeViewWithBreadcrumbsForCurrentUser(CController $controller, View $containedView, $breadcrumbLinks, $breadcrumbViewClassName, $cssClasses = array('AdministrativeArea'))
{
return parent::makeViewWithBreadcrumbsForCurrentUser($controller, $containedView, $breadcrumbLinks, $breadcrumbViewClassName, $cssClasses);
}
示例8: processEdit
protected function processEdit(GameReward $gameReward, $redirectUrl = null, $isBeingCopied = false)
{
if ($isBeingCopied) {
$title = Zurmo::t('Core', 'Edit Game Reward');
} else {
$title = Zurmo::t('Core', 'Copy Game Reward');
}
$breadCrumbLinks = array(strval($gameReward) => array('default/details', 'id' => $gameReward->id), $title);
$view = new GameRewardsPageView(ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $this->makeEditAndDetailsView($this->attemptToSaveModelFromPost($gameReward, $redirectUrl), 'Edit'), $breadCrumbLinks, 'GameRewardBreadCrumbView'));
echo $view->render();
}
示例9: resolveTaskKanbanViewForRelation
/**
* Resolve task kanban view for relation
* @param RedBeanModel $model
* @param string $moduleId
* @param ZurmoModuleController $controller
* @param TasksForRelatedKanbanView $kanbanView
* @param ZurmoDefaultPageView $pageView
* @return ZurmoDefaultPageView
*/
public static function resolveTaskKanbanViewForRelation($model, $moduleId, $controller, $kanbanView, $pageView)
{
assert('$model instanceof RedBeanModel');
assert('is_string($moduleId)');
assert('$controller instanceof ZurmoModuleController');
assert('is_string($kanbanView)');
assert('is_string($pageView)');
$breadCrumbLinks = array(StringUtil::getChoppedStringContent(strval($model), 25));
$kanbanItem = new KanbanItem();
$kanbanBoard = new TaskKanbanBoard($kanbanItem, 'type', $model, get_class($model));
$kanbanBoard->setIsActive();
$params['relationModel'] = $model;
$params['relationModuleId'] = $moduleId;
$params['redirectUrl'] = null;
$listView = new $kanbanView($controller->getId(), 'tasks', 'Task', null, $params, null, array(), $kanbanBoard);
$view = new $pageView(ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($controller, $listView, $breadCrumbLinks, 'KanbanBoardBreadCrumbView'));
return $view;
}