当前位置: 首页>>代码示例>>PHP>>正文


PHP Dashboard::getByLayoutIdAndUser方法代码示例

本文整理汇总了PHP中Dashboard::getByLayoutIdAndUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Dashboard::getByLayoutIdAndUser方法的具体用法?PHP Dashboard::getByLayoutIdAndUser怎么用?PHP Dashboard::getByLayoutIdAndUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dashboard的用法示例。


在下文中一共展示了Dashboard::getByLayoutIdAndUser方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     //Setup test data owned by the super user.
     $account = AccountTestHelper::createAccountByNameForOwner('superAccount', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount2', $super);
     ContactTestHelper::createContactWithAccountByNameForOwner('superContact', $super, $account);
     ContactTestHelper::createContactWithAccountByNameForOwner('superContact2', $super, $account);
     OpportunityTestHelper::createOpportunityStagesIfDoesNotExist();
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp2', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp3', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp4', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp5', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp6', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp7', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp8', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp9', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp10', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp11', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp12', $super, $account);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:27,代码来源:OpportunitiesSuperUserWalkthroughTest.php

示例2: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     //Setup test data owned by the super user.
     AccountTestHelper::createAccountByNameForOwner('superAccount', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount2', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount3', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount4', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount5', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount6', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount7', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount8', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount9', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount10', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount11', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount12', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount13', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount14', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount15', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount16', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount17', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount18', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount19', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount20', $super);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:30,代码来源:AccountsSuperUserWalkthroughTest.php

示例3: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     //Setup test data owned by the super user.
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, Yii::app()->user->userModel);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:7,代码来源:HomeRegularUserWalkthroughTest.php

示例4: testGetByLayoutIdAndUserId

 /**
  * @depends testGetNextLayoutId
  */
 public function testGetByLayoutIdAndUserId()
 {
     $user = User::getByUserName('billy');
     Yii::app()->user->userModel = $user;
     for ($i = 1; $i <= 3; $i++) {
         $dashboard = Dashboard::getByLayoutIdAndUser($i, $user);
         $this->assertEquals($i, $dashboard->layoutId);
         $this->assertEquals("Dashboard {$i}", $dashboard->name);
         $this->assertEquals('100', $dashboard->layoutType);
     }
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:14,代码来源:DashboardTest.php

示例5: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     //Setup test data owned by the super user.
     AccountTestHelper::createAccountByNameForOwner('superAccount', $super);
     AddressGeoCodeTestHelper::createAndRemoveAccountWithAddress($super);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:12,代码来源:MapsPortletSuperUserWalkthroughTest.php

示例6: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     //Setup test data owned by the super user.
     AccountTestHelper::createAccountByNameForOwner('superAccount', Yii::app()->user->userModel);
     AccountTestHelper::createAccountByNameForOwner('superAccount2', Yii::app()->user->userModel);
     AccountTestHelper::createAccountByNameForOwner('superAccount3', Yii::app()->user->userModel);
     AccountTestHelper::createAccountByNameForOwner('superAccount4', Yii::app()->user->userModel);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, Yii::app()->user->userModel);
     ReadPermissionsOptimizationUtil::rebuild();
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:12,代码来源:AccountsRegularUserWalkthroughTest.php

示例7: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $super = Yii::app()->user->userModel;
     //Setup test data owned by the super user.
     ProjectTestHelper::createProjectByNameForOwner("My Project 1", $super);
     ProjectTestHelper::createProjectByNameForOwner("My Project 2", $super);
     ProjectTestHelper::createProjectByNameForOwner("My Project 3", $super);
     ProjectTestHelper::createProjectByNameForOwner("My Project 4", $super);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
     AllPermissionsOptimizationUtil::rebuild();
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:13,代码来源:ProjectsRegularUserWalkthroughTest.php

示例8: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $super = Yii::app()->user->userModel;
     //Setup test data owned by the super user.
     ContactWebFormTestHelper::createContactWebFormByName("Web Form 1");
     ContactWebFormTestHelper::createContactWebFormByName("Web Form 2");
     ContactWebFormTestHelper::createContactWebFormByName("Web Form 3");
     ContactWebFormTestHelper::createContactWebFormByName("Web Form 4");
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
     AllPermissionsOptimizationUtil::rebuild();
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:13,代码来源:ContactWebFormsRegularUserWalkthroughTest.php

示例9: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $super = Yii::app()->user->userModel;
     //Setup test data owned by the super user.
     LeadTestHelper::createLeadbyNameForOwner('superLead', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead2', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead3', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead4', $super);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
     AllPermissionsOptimizationUtil::rebuild();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:13,代码来源:LeadsRegularUserWalkthroughTest.php

示例10: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     //Setup test data owned by the super user.
     LeadTestHelper::createLeadbyNameForOwner('superLead', $super);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
     //Setup test marketingList
     MarketingListTestHelper::createMarketingListByName('MarketingListName', 'MarketingList Description', 'first', 'first@zurmo.com');
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:13,代码来源:LeadDetailsAndRelationsPortletViewTest.php

示例11: actionDashboardDetails

 public function actionDashboardDetails($id)
 {
     if (intval($id) > 0) {
         $dashboard = Dashboard::getById(intval($id));
         $layoutId = $dashboard->layoutId;
     } else {
         $dashboard = Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, Yii::app()->user->userModel);
         $layoutId = $dashboard->layoutId;
     }
     $params = array('controllerId' => $this->getId(), 'moduleId' => $this->getModule()->getId());
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($dashboard);
     $homeTitleBarAndDashboardView = new HomeTitleBarAndDashboardView($this->getId(), $this->getModule()->getId(), 'HomeDashboard' . $layoutId, $dashboard, $params);
     $view = new HomePageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $homeTitleBarAndDashboardView));
     echo $view->render();
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:15,代码来源:DefaultController.php

示例12: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $super = Yii::app()->user->userModel;
     //Setup test data owned by the super user.
     $account = AccountTestHelper::createAccountByNameForOwner('superAccount', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount2', $super);
     ContactTestHelper::createContactWithAccountByNameForOwner('superContact', $super, $account);
     ContactTestHelper::createContactWithAccountByNameForOwner('superContact2', $super, $account);
     ContractTestHelper::createContractStagesIfDoesNotExist();
     ContractTestHelper::createContractWithAccountByNameForOwner('superOpp', $super, $account);
     ContractTestHelper::createContractWithAccountByNameForOwner('superOpp2', $super, $account);
     ContractTestHelper::createContractWithAccountByNameForOwner('superOpp3', $super, $account);
     ContractTestHelper::createContractWithAccountByNameForOwner('superOpp4', $super, $account);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
     AllPermissionsOptimizationUtil::rebuild();
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:18,代码来源:ContractsRegularUserWalkthroughTest.php

示例13: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     //Setup test data owned by the super user.
     LeadTestHelper::createLeadbyNameForOwner('superLead', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead2', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead3', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead4', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead5', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead6', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead7', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead8', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead9', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead10', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead11', $super);
     LeadTestHelper::createLeadbyNameForOwner('superLead12', $super);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:22,代码来源:LeadsSuperUserWalkthroughTest.php

示例14: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     //Setup test data owned by the super user.
     self::$gameReward1 = GameRewardTestHelper::createGameRewardByNameForOwner('superGameReward', $super);
     self::$gameReward2 = GameRewardTestHelper::createGameRewardByNameForOwner('superGameReward2', $super);
     self::$gameReward3 = GameRewardTestHelper::createGameRewardByNameForOwner('superGameReward3', $super);
     self::$gameReward4 = GameRewardTestHelper::createGameRewardByNameForOwner('superGameReward4', $super);
     self::$gameReward5 = GameRewardTestHelper::createGameRewardByNameForOwner('superGameReward5', $super);
     self::$gameReward6 = GameRewardTestHelper::createGameRewardByNameForOwner('superGameReward6', $super);
     self::$gameReward7 = GameRewardTestHelper::createGameRewardByNameForOwner('superGameReward7', $super);
     self::$gameReward8 = GameRewardTestHelper::createGameRewardByNameForOwner('superGameReward8', $super);
     self::$gameReward9 = GameRewardTestHelper::createGameRewardByNameForOwner('superGameReward9', $super);
     self::$gameReward10 = GameRewardTestHelper::createGameRewardByNameForOwner('superGameReward10', $super);
     self::$gameReward11 = GameRewardTestHelper::createGameRewardByNameForOwner('superGameReward11', $super);
     self::$gameReward12 = GameRewardTestHelper::createGameRewardByNameForOwner('superGameReward12', $super);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:22,代码来源:GameRewardsSuperUserWalkthroughTest.php

示例15: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     ReadPermissionsOptimizationUtil::rebuild();
     //create everyone group
     $everyoneGroup = Group::getByName(Group::EVERYONE_GROUP_NAME);
     $everyoneGroup->save();
     //Create test users
     $steven = UserTestHelper::createBasicUser('steven');
     $sally = UserTestHelper::createBasicUser('sally');
     $mary = UserTestHelper::createBasicUser('mary');
     //give 3 users access to social items
     $steven->setRight('SocialItemsModule', SocialItemsModule::RIGHT_ACCESS_SOCIAL_ITEMS, Right::ALLOW);
     $saved = $steven->save();
     if (!$saved) {
         throw new NotSupportedException();
     }
     $sally->setRight('SocialItemsModule', SocialItemsModule::RIGHT_ACCESS_SOCIAL_ITEMS, Right::ALLOW);
     $saved = $sally->save();
     if (!$saved) {
         throw new NotSupportedException();
     }
     $mary->setRight('SocialItemsModule', SocialItemsModule::RIGHT_ACCESS_SOCIAL_ITEMS, Right::ALLOW);
     $saved = $mary->save();
     if (!$saved) {
         throw new NotSupportedException();
     }
     //Setup test data owned by the super user.
     $account = AccountTestHelper::createAccountByNameForOwner('superAccount', $super);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $mary);
     ContactsModule::loadStartingData();
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:37,代码来源:SocialItemsUserWalkthroughTest.php


注:本文中的Dashboard::getByLayoutIdAndUser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。