Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.
 All Data Structures Functions Variables Pages
ContactListViewMergeTestHelper.php
1 <?php
2  /*********************************************************************************
3  * Zurmo is a customer relationship management program developed by
4  * Zurmo, Inc. Copyright (C) 2017 Zurmo Inc.
5  *
6  * Zurmo is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY ZURMO, ZURMO DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  *
13  * Zurmo is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  *
23  * You can contact Zurmo, Inc. with a mailing address at 27 North Wacker Drive
24  * Suite 370 Chicago, IL 60606. or at email address contact@zurmo.com.
25  *
26  * The interactive user interfaces in original and modified versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  *
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the Zurmo
32  * logo and Zurmo copyright notice. If the display of the logo is not reasonably
33  * feasible for technical reasons, the Appropriate Legal Notices must display the words
34  * "Copyright Zurmo Inc. 2017. All rights reserved".
35  ********************************************************************************/
36 
38  {
39  public static function getFirstModel($user)
40  {
41  $industryValues = AccountListViewMergeTestHelper::getIndustryValues();
42  $account = new Account();
43  $account->name = 'Some Account';
44  $account->owner = $user;
45  $saved = $account->save();
46  assert('$saved');
47  $contactStates = ContactState::getByName('Qualified');
48  $contact = new Contact();
49  $dateTime = DateTimeUtil::convertTimestampToDbFormatDateTime(time());
50  $contact->setLatestActivityDateTime($dateTime);
51  $contact->owner = $user;
52  $contact->title->value = 'Mr.';
53  $contact->firstName = 'Super';
54  $contact->lastName = 'Man';
55  $contact->jobTitle = 'Superhero';
56  $contact->source->value = 'Outbound';
57  $contact->account = $account;
58  $contact->companyName = 'Test Company';
59  $contact->description = 'Some Description';
60  $contact->department = 'Red Tape';
61  $contact->officePhone = '1234567890';
62  $contact->mobilePhone = '0987654321';
63  $contact->officeFax = '1222222222';
64  $contact->state = $contactStates[0];
65  $contact->website = 'http://yahoo.com';
66  $contact->industry->value = $industryValues[0];
67  $contact->primaryEmail->emailAddress = 'thejman@zurmoinc.com';
68  $contact->primaryEmail->optOut = 0;
69  $contact->primaryEmail->isInvalid = 0;
70  $contact->secondaryEmail->emailAddress = 'digi@magic.net';
71  $contact->secondaryEmail->optOut = 1;
72  $contact->secondaryEmail->isInvalid = 1;
73  $contact->primaryAddress->street1 = '129 Noodle Boulevard';
74  $contact->primaryAddress->street2 = 'Apartment 6000A';
75  $contact->primaryAddress->city = 'Noodleville';
76  $contact->primaryAddress->state = 'New Delhi';
77  $contact->primaryAddress->postalCode = '23453';
78  $contact->primaryAddress->country = 'The Good Old US of A';
79  $contact->secondaryAddress->street1 = '25 de Agosto 2543';
80  $contact->secondaryAddress->street2 = 'Local 3';
81  $contact->secondaryAddress->city = 'Ciudad de Los Fideos';
82  $contact->secondaryAddress->state = 'Haryana';
83  $contact->secondaryAddress->postalCode = '5123-4';
84  $contact->secondaryAddress->country = 'Latinoland';
85  $saved = $contact->save();
86  assert('$saved');
87  return $contact;
88  }
89 
90  public static function getSecondModel($user)
91  {
92  $industryValues = AccountListViewMergeTestHelper::getIndustryValues();
93  $account = new Account();
94  $account->name = 'New Account';
95  $account->owner = $user;
96  $saved = $account->save();
97  assert('$saved');
98  $contactCustomerStates = ContactState::getByName('Customer');
99  $contact2 = ContactTestHelper::createContactByNameForOwner('shozin', Yii::app()->user->userModel);
100  $contact2->title->value = 'Mrs.';
101  $contact2->state = $contactCustomerStates[0];
102  $contact2->jobTitle = 'Myhero';
103  $contact2->source->value = 'Trade Show';
104  $contact2->companyName = 'Test Company1';
105  $contact2->account = $account;
106  $contact2->description = 'Hey Description';
107  $contact2->industry->value= $industryValues[1];
108  $contact2->department = 'Black Tape';
109  $contact2->officePhone = '1234567899';
110  $contact2->mobilePhone = '0987654123';
111  $contact2->officeFax = '1222222444';
112  $contact2->website = 'http://yahoo1.com';
113  $contact2->primaryEmail->emailAddress = 'test@yahoo.com';
114  $contact2->primaryEmail->optOut = 0;
115  $contact2->primaryEmail->isInvalid = 0;
116  $contact2->secondaryEmail->emailAddress = 'test@gmail.com';
117  $contact2->secondaryEmail->optOut = 1;
118  $contact2->secondaryEmail->isInvalid = 1;
119  $contact2->primaryAddress->street1 = '302';
120  $contact2->primaryAddress->street2 = '9A/1';
121  $contact2->primaryAddress->city = 'New Delhi';
122  $contact2->primaryAddress->state = 'New Delhi';
123  $contact2->primaryAddress->postalCode = '110005';
124  $contact2->primaryAddress->country = 'India';
125  $contact2->secondaryAddress->street1 = 'A-8';
126  $contact2->secondaryAddress->street2 = 'Sector 56';
127  $contact2->secondaryAddress->city = 'Gurgaon';
128  $contact2->secondaryAddress->state = 'Haryana';
129  $contact2->secondaryAddress->postalCode = '5123-4';
130  $contact2->secondaryAddress->country = 'IndiaTest';
131  $saved = $contact2->save();
132  assert('$saved');
133  return $contact2;
134  }
135  }
136 ?>
Generated on Thu Sep 24 2020 07:10:29
Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.