本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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');
}
示例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();
}
示例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();
}
示例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);
}
示例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);
}
示例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();
}