Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.
 All Data Structures Functions Variables Pages
ContactDetailsPortletView.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 
41  {
42  protected $params;
43 
44  protected $viewData;
45 
46  protected $uniqueLayoutId;
47 
48  protected $supportsSlidingPanels = true;
49 
55  public function __construct($viewData, $params, $uniqueLayoutId)
56  {
57  assert('isset($params["controllerId"])');
58  assert('isset($params["relationModuleId"])');
59  assert('$params["relationModel"] instanceof RedBeanModel || $params["relationModel"] instanceof ModelForm');
60  assert('isset($params["portletId"])');
61  assert('isset($params["redirectUrl"])');
62  $this->modelClassName = $this->getModelClassName();
63  $this->viewData = $viewData;
64  $this->params = $params;
65  $this->uniqueLayoutId = $uniqueLayoutId;
66  $this->gridIdSuffix = $uniqueLayoutId;
67  $this->rowsAreSelectable = false;
68  $this->gridId = 'list-view';
69  $this->controllerId = $this->resolveControllerId();
70  $this->moduleId = $this->resolveModuleId();
71  parent::__construct('Details', $this->controllerId, $this->moduleId, $params["relationModel"]);
72  }
73 
74  public function getPortletParams()
75  {
76  return array();
77  }
78 
79  public static function getPortletRulesType()
80  {
81  return 'Detail';
82  }
83 
84  public static function getModuleClassName()
85  {
86  return 'ContactsModule';
87  }
88 
89  protected static function resolveMetadataClassNameToUse()
90  {
91  return 'ContactEditAndDetailsView';
92  }
93 
97  private function resolveControllerId()
98  {
99  return 'default';
100  }
101 
105  private function resolveModuleId()
106  {
107  return 'contacts';
108  }
109 
110  public static function canUserConfigure()
111  {
112  return false;
113  }
114 
115  protected function renderTitleContent()
116  {
117  return null;
118  }
119 
120  public static function canUserRemove()
121  {
122  return false;
123  }
124 
125  public static function getDesignerRulesType()
126  {
127  return 'DetailsPortletView';
128  }
129 
133  public static function getPortletDescription()
134  {
135  }
136 
142  {
143  return null;
144  }
145 
149  public function renderPortletHeadContent()
150  {
151  return $this->renderWrapperAndActionElementMenu();
152  }
153 
158  public function getTitle()
159  {
160  return Zurmo::t('Core', 'Details');
161  }
162 
163  protected function resolveLeftContentForSlidingPanels($content)
164  {
165  $content = $this->makeFirstSlidingPanelContent($content);
166  $content .= $this->makeSecondSlidingPanelContent();
167  return $content;
168  }
169 
170  protected function makeFirstSlidingPanelContent($content)
171  {
172  return PersonSlidingPanelsUtil::makeFirstSlidingPanelContent((int)$this->params['portletId'], $content);
173  }
174 
175  protected function makeSecondSlidingPanelContent()
176  {
177  $layout = new PersonCardViewLayout($this->model);
178  $content = $layout->renderContent();
179  return PersonSlidingPanelsUtil::makeSecondSlidingPanelContent((int)$this->params['portletId'], $content);
180  }
181 
182  protected function renderAfterDetailsTable()
183  {
184  return PersonSlidingPanelsUtil::renderToggleLinkContent((int)$this->params['portletId']);
185  }
186  }
187 ?>
static renderToggleLinkContent($portletId)
static makeFirstSlidingPanelContent($portletId, $content)
__construct($viewData, $params, $uniqueLayoutId)
static makeSecondSlidingPanelContent($portletId, $content)
Generated on Sun Jan 17 2021 07:10:21
Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.