當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ModalView::render方法代碼示例

本文整理匯總了PHP中ModalView::render方法的典型用法代碼示例。如果您正苦於以下問題:PHP ModalView::render方法的具體用法?PHP ModalView::render怎麽用?PHP ModalView::render使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ModalView的用法示例。


在下文中一共展示了ModalView::render方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: preFilter

 protected function preFilter($filterChain)
 {
     $sendGridPluginEnabled = (bool) ZurmoConfigurationUtil::getByModuleName('SendGridModule', 'enableSendgrid');
     try {
         if ($sendGridPluginEnabled) {
             SendGridEmailAccount::getByUserAndName(Yii::app()->user->userModel, null);
         } else {
             EmailAccount::getByUserAndName(Yii::app()->user->userModel);
         }
     } catch (NotFoundException $e) {
         $redirectUrl = Yii::app()->request->getParam('redirectUrl');
         if ($sendGridPluginEnabled) {
             try {
                 EmailAccount::getByUserAndName(Yii::app()->user->userModel);
             } catch (NotFoundException $ex) {
                 $messageView = new NoUserEmailConfigurationYetView($redirectUrl);
                 $view = new ModalView($this->controller, $messageView);
                 Yii::app()->getClientScript()->setToAjaxMode();
                 echo $view->render();
                 return false;
             }
         } else {
             $messageView = new NoUserEmailConfigurationYetView($redirectUrl);
             $view = new ModalView($this->controller, $messageView);
             Yii::app()->getClientScript()->setToAjaxMode();
             echo $view->render();
             return false;
         }
     }
     return true;
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:31,代碼來源:UserEmailConfigurationCheckControllerFilter.php

示例2: renderList

 /**
  * @return rendered content from view as string.
  */
 public static function renderList(CController $controller, $dataProvider)
 {
     assert('$dataProvider instanceof RedBeanModelDataProvider');
     $auditEventsListView = new AuditEventsModalListView($controller->getId(), $controller->getModule()->getId(), 'AuditEvent', $dataProvider, 'modal');
     $view = new ModalView($controller, $auditEventsListView);
     return $view->render();
 }
開發者ID:youprofit,項目名稱:Zurmo,代碼行數:10,代碼來源:AuditEventsListControllerUtil.php

示例3: renderList

 /**
  * @return rendered content from view as string.
  */
 public static function renderList(CController $controller, $dataProvider, $action)
 {
     assert('$dataProvider instanceof RedBeanModelDataProvider');
     $modalListLinkProvider = new UserDetailsModalListLinkProvider('users', 'default', 'details');
     $usersListView = new UsersByModelModalListView($controller->getId(), $controller->getModule()->getId(), $action, 'User', $modalListLinkProvider, $dataProvider, 'modal');
     $view = new ModalView($controller, $usersListView);
     return $view->render();
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:11,代碼來源:UsersByModelModalListControllerUtil.php

示例4: actionModalConfigEdit

 /**
  * Called using Ajax. Renders a modal popup
  * of the portlet's configuration view.
  * Also called on 'save' of the modal popup form
  * in order to validate form.
  */
 public function actionModalConfigEdit()
 {
     if (isset($_POST['ajax']) && $_POST['ajax'] === 'modal-edit-form') {
         $this->actionModalConfigValidate();
     }
     Yii::app()->getClientScript()->setToAjaxMode();
     $portlet = Portlet::getById(intval($_GET['portletId']));
     $portlet->params = array('modalConfigSaveAction' => 'modalConfigSave', 'controllerId' => $this->getId(), 'moduleId' => $this->getModule()->getId(), 'uniquePortletPageId' => $portlet->getUniquePortletPageId());
     $configurableView = $portlet->getView()->getConfigurationView();
     $view = new ModalView($this, $configurableView);
     echo $view->render();
 }
開發者ID:youprofit,項目名稱:Zurmo,代碼行數:18,代碼來源:PortletController.php

示例5: preFilter

 protected function preFilter($filterChain)
 {
     try {
         EmailAccount::getByUserAndName(Yii::app()->user->userModel);
     } catch (NotFoundException $e) {
         $redirectUrl = Yii::app()->request->getParam('redirectUrl');
         $messageView = new NoUserEmailConfigurationYetView($redirectUrl);
         $view = new ModalView($this->controller, $messageView);
         Yii::app()->getClientScript()->setToAjaxMode();
         echo $view->render();
         return false;
     }
     return true;
 }
開發者ID:youprofit,項目名稱:Zurmo,代碼行數:14,代碼來源:UserEmailConfigurationCheckControllerFilter.php

示例6: actionDaysMeetingsFromCalendarModalList

 public function actionDaysMeetingsFromCalendarModalList($stringTime, $redirectUrl)
 {
     if (isset($_GET['ownerOnly'])) {
         $ownerOnly = true;
     } else {
         $ownerOnly = false;
     }
     if (isset($_GET['relationModelId'])) {
         $relationModelClassName = $_GET['relationModelClassName'];
         $relationModel = $relationModelClassName::getById((int) $_GET['relationModelId']);
     } else {
         $relationModel = null;
     }
     Yii::app()->getClientScript()->setToAjaxMode();
     $meetingsView = new DaysMeetingsFromCalendarModalListView($this->getId(), $this->getModule()->getId(), $stringTime, $redirectUrl, $ownerOnly, $relationModel);
     $view = new ModalView($this, $meetingsView);
     echo $view->render();
 }
開發者ID:youprofit,項目名稱:Zurmo,代碼行數:18,代碼來源:DefaultController.php

示例7: renderModalSearchList

 /**
  * @return rendered content from view as string.
  */
 protected static function renderModalSearchList(CController $controller, $modalListLinkProvider, $stateMetadataAdapterClassName = null)
 {
     assert('$modalListLinkProvider instanceof ModalListLinkProvider');
     $className = $controller->getModule()->getPluralCamelCasedName() . 'ModalSearchAndListView';
     $modelClassName = $controller->getModule()->getPrimaryModelName();
     $searchViewClassName = $className::getSearchViewClassName();
     if ($searchViewClassName::getModelForMetadataClassName() != null) {
         $formModelClassName = $searchViewClassName::getModelForMetadataClassName();
         $model = new $modelClassName(false);
         $searchModel = new $formModelClassName($model);
     } else {
         throw new NotSupportedException();
     }
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('modalListPageSize', get_class($controller->getModule()));
     $dataProvider = $controller->makeRedBeanDataProviderByDataCollection($searchModel, $pageSize, $stateMetadataAdapterClassName);
     $searchAndListView = new $className($controller->getId(), $controller->getModule()->getId(), $controller->getAction()->getId(), $modalListLinkProvider, $searchModel, $model, $dataProvider, 'modal');
     $view = new ModalView($controller, $searchAndListView);
     return $view->render();
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:22,代碼來源:ModalSearchListControllerUtil.php

示例8: actionTestConnection

 public function actionTestConnection()
 {
     $configurationForm = LdapConfigurationFormAdapter::makeFormFromGlobalConfiguration();
     $postVariableName = get_class($configurationForm);
     if (isset($_POST[$postVariableName]) || isset($_POST['LdapConfigurationForm'])) {
         if (isset($_POST[$postVariableName])) {
             $configurationForm->setAttributes($_POST[$postVariableName]);
         } else {
             $configurationForm->serverType = $_POST['LdapConfigurationForm']['serverType'];
             $configurationForm->host = $_POST['LdapConfigurationForm']['host'];
             $configurationForm->port = $_POST['LdapConfigurationForm']['port'];
             $configurationForm->bindRegisteredDomain = $_POST['LdapConfigurationForm']['bindRegisteredDomain'];
             $configurationForm->bindPassword = $_POST['LdapConfigurationForm']['bindPassword'];
             $configurationForm->baseDomain = $_POST['LdapConfigurationForm']['baseDomain'];
             $configurationForm->enabled = $_POST['LdapConfigurationForm']['enabled'];
         }
         if ($configurationForm->host != null && $configurationForm->port != null && $configurationForm->bindRegisteredDomain != null && $configurationForm->bindPassword != null && $configurationForm->baseDomain != null && $configurationForm->serverType != null) {
             $authenticationHelper = new ZurmoAuthenticationHelper();
             $authenticationHelper->ldapServerType = $configurationForm->serverType;
             $authenticationHelper->ldapHost = $configurationForm->host;
             $authenticationHelper->ldapPort = $configurationForm->port;
             $authenticationHelper->ldapBindRegisteredDomain = $configurationForm->bindRegisteredDomain;
             $authenticationHelper->ldapBindPassword = $configurationForm->bindPassword;
             $authenticationHelper->ldapBaseDomain = $configurationForm->baseDomain;
             $authenticationHelper->ldapEnabled = $configurationForm->enabled;
             $serverType = $configurationForm->serverType;
             $host = $configurationForm->host;
             $port = $configurationForm->port;
             $bindRegisteredDomain = $configurationForm->bindRegisteredDomain;
             $bindPassword = $configurationForm->bindPassword;
             $baseDomain = $configurationForm->baseDomain;
             $testConnectionResults = LdapUtil::establishConnection($serverType, $host, $port, $bindRegisteredDomain, $bindPassword, $baseDomain);
             if ($testConnectionResults) {
                 $messageContent = Zurmo::t('ZurmoModule', 'Successfully Connected to Ldap Server') . "\n";
             } else {
                 $messageContent = Zurmo::t('ZurmoModule', 'Unable to connect to Ldap server') . "\n";
             }
         } else {
             $messageContent = Zurmo::t('ZurmoModule', 'All fields are required') . "\n";
         }
         Yii::app()->getClientScript()->setToAjaxMode();
         $messageView = new TestConnectionView($messageContent);
         $view = new ModalView($this, $messageView);
         echo $view->render();
     } else {
         throw new NotSupportedException();
     }
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:48,代碼來源:LdapController.php

示例9: actionModalList

 public function actionModalList()
 {
     $groupsModalTreeView = new SelectParentGroupModalTreeListView($this->getId(), $this->getModule()->getId(), $_GET['modalTransferInformation']['sourceModelId'], static::getGroupsOrderedByNonDeletablesFirst(false), $_GET['modalTransferInformation']['sourceIdFieldId'], $_GET['modalTransferInformation']['sourceNameFieldId'], $_GET['modalTransferInformation']['modalId']);
     Yii::app()->getClientScript()->setToAjaxMode();
     $pageTitle = Zurmo::t('ZurmoModule', 'Select a Parent Group');
     $view = new ModalView($this, $groupsModalTreeView);
     echo $view->render();
 }
開發者ID:maruthisivaprasad,項目名稱:zurmo,代碼行數:8,代碼來源:GroupController.php

示例10: actionAddList

 public function actionAddList()
 {
     Yii::app()->getClientScript()->setToAjaxMode();
     $view = new ModalView($this, new DetailsPortletSelectionView($this->getId(), $this->getModule()->getId(), $_GET['modelId'], $_GET['uniqueLayoutId']));
     echo $view->render();
 }
開發者ID:maruthisivaprasad,項目名稱:zurmo,代碼行數:6,代碼來源:ZurmoPortletController.php

示例11: actionMergeTagGuide

 public function actionMergeTagGuide()
 {
     Yii::app()->getClientScript()->setToAjaxMode();
     $view = new ModalView($this, new MergeTagGuideView());
     echo $view->render();
 }
開發者ID:maruthisivaprasad,項目名稱:zurmo,代碼行數:6,代碼來源:DefaultController.php

示例12: actionModalList

 public function actionModalList()
 {
     $modalListLinkProvider = $this->getModalListLinkProvider();
     Yii::app()->getClientScript()->setToAjaxMode();
     $className = 'ImageModalSearchAndListView';
     $modelClassName = 'ImageFileModel';
     $stateMetadataAdapterClassName = null;
     $searchViewClassName = $className::getSearchViewClassName();
     if ($searchViewClassName::getModelForMetadataClassName() != null) {
         $formModelClassName = $searchViewClassName::getModelForMetadataClassName();
         $model = new $modelClassName(false);
         $searchModel = new $formModelClassName($model);
     } else {
         throw new NotSupportedException();
     }
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('modalListPageSize', get_class($this->getModule()));
     $dataProvider = $this->resolveSearchDataProvider($searchModel, $pageSize, $stateMetadataAdapterClassName, 'ImagesSearchView');
     $imageModalSearchAndListAndUploadView = new ImageModalSearchAndListAndUploadView($this, $this->module->id, 'modalList', $modalListLinkProvider, $searchModel, $model, $dataProvider, 'modal');
     $view = new ModalView($this, $imageModalSearchAndListAndUploadView);
     echo $view->render();
 }
開發者ID:maruthisivaprasad,項目名稱:zurmo,代碼行數:21,代碼來源:ImageModelController.php

示例13: renderModalList

 protected function renderModalList($modalViewName, $pageTitle)
 {
     $rolesModalTreeView = new $modalViewName($this->getId(), $this->getModule()->getId(), $_GET['modalTransferInformation']['sourceModelId'], Role::getAll('name'), $_GET['modalTransferInformation']['sourceIdFieldId'], $_GET['modalTransferInformation']['sourceNameFieldId'], $_GET['modalTransferInformation']['modalId']);
     Yii::app()->getClientScript()->setToAjaxMode();
     $view = new ModalView($this, $rolesModalTreeView);
     return $view->render();
 }
開發者ID:sandeep1027,項目名稱:zurmo_,代碼行數:7,代碼來源:RoleController.php

示例14: renderModalDetailsView

 /**
  * @param $controller
  * @param $modalEditView
  * @param $model
  * @return string
  */
 protected static function renderModalDetailsView($controller, $modalEditView, $model)
 {
     $editAndDetailsView = new $modalEditView($controller->getId(), $controller->getModule()->getId(), $model);
     $view = new ModalView($controller, $editAndDetailsView);
     return $view->render();
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:12,代碼來源:ModalEditAndDetailsControllerUtil.php

示例15: actionChangeAvatar

 public function actionChangeAvatar($id)
 {
     if (Yii::app()->user->userModel->id == intval($id) || RightsUtil::canUserAccessModule('UsersModule', Yii::app()->user->userModel)) {
         $user = User::getById(intval($id));
         if (UserAccessUtil::resolveCanCurrentUserAccessRootUser($user, false) && UserAccessUtil::resolveAccessingASystemUser($user, false)) {
             $userAvatarForm = new UserAvatarForm($user);
             $this->attemptToValidateAjaxFromPost($userAvatarForm, 'UserAvatarForm');
             $viewForModal = new UserChangeAvatarView($this->getId(), $this->getModule()->getId(), $userAvatarForm);
             $this->attemptToSaveModelFromPost($userAvatarForm);
         } else {
             $viewForModal = new AccessFailureView();
         }
     } else {
         $viewForModal = new AccessFailureView();
     }
     $view = new ModalView($this, $viewForModal);
     Yii::app()->getClientScript()->setToAjaxMode();
     echo $view->render();
 }
開發者ID:maruthisivaprasad,項目名稱:zurmo,代碼行數:19,代碼來源:DefaultController.php


注:本文中的ModalView::render方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。