All Data Structures Functions Variables Pages
CustomManagement.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 
43  class CustomManagement extends CApplicationComponent
44  {
52  public function runBeforeInstallationAutoBuildDatabase(MessageLogger $messageLogger)
53  {
54  }
55 
61  public function runAfterInstallationDefaultDataLoad(MessageLogger $messageLogger)
62  {
63  }
64 
69  public function resolveIsCustomDataLoaded()
70  {
71  }
72 
80  public function runImportsForImportCommand(ImportMessageLogger $messageLogger, $importName = null)
81  {
82  $messageLogger->addErrorMessage(Zurmo::t('Core', 'No import processes found.'));
83  $messageLogger->addErrorMessage(Zurmo::t('Core', 'CustomManagement class needs to be extended.'));
84  }
85 
86  public function resolveElementInformationDuringFormLayoutRender(DetailsView $view, &$elementInformation)
87  {
88  }
89 
90  public function resolveActionElementInformationDuringRender(MetadataView $view, & $elementInformation)
91  {
92  }
93 
99  public function setCalendarItemTitle(CalendarItem $calendarItem, RedBeanModel $model)
100  {
101  $calendarItem->setTitle(StringUtil::getChoppedStringContent($model->name, CalendarItem::MAXIMUM_TITLE_LENGTH));
102  }
103 
109  public function resolveRowMenuColumnClassForOpenTaskPortlet($relationAttributeName)
110  {
111  return 'RowMenuColumn';
112  }
113 
118  public function registerTaskModalDetailsScript($gridViewId)
119  {
120  assert('is_string($gridViewId)');
122  }
123 
130  {
131  if (method_exists($searchModel, 'shouldFilterByRelatedModels') && $searchModel->shouldFilterByRelatedModels())
132  {
133  return $searchModel->resolveDataProviderClassName();
134  }
135  elseif ($searchModel->filterByStarred)
136  {
137  return 'StarredModelDataProvider';
138  }
139  return 'RedBeanModelDataProvider';
140  }
141 
148  public function registerOpenToTaskModalDetailsScript($taskId, $sourceId)
149  {
151  }
152 
159  public function renderKanbanSearchView($searchFormModel, $params)
160  {
161  assert('$searchFormModel instanceof TasksSearchForm');
162  $searchView = new TasksForRelatedKanbanSearchView($searchFormModel, 'Task');
163  return $searchView->render();
164  }
165 
171  public function resolveKanbanCardColumns($columns)
172  {
173  assert('is_array($columns)');
174  return $columns;
175  }
176 
183  public function renderExtraAttributesWithNameInKanbanCard($cardColumns, Task $task, $row)
184  {
185  return null;
186  }
187 
193  {
194  return 'TaskModalButtonColumn';
195  }
196 
205  $params,
206  $defaultOptionsContent,
207  $parentContent)
208  {
209  return $defaultOptionsContent;
210  }
211 
215  public function resolveComponentRulesClassNameByModule($moduleClassName, $rulesName)
216  {
217  return $moduleClassName::getPluralCamelCasedName() . $rulesName;
218  }
219 
226  {
227  return null;
228  }
229 
230  public function resolveAdditionalScriptContentForEmailTemplate($stepCount, & $script)
231  {
232  }
233 
234  public function resolveQueueModelEditAndDetailsViewOnLoadScript($model)
235  {
236  }
237 
238  public function resolveQueueModelEditViewOnRuleTypeChangeScript($model)
239  {
240  }
241 
242  public function resolveIsConfigurationMenuItemVisibleForCurrentUser($menuItem)
243  {
244  return true;
245  }
246 
247  public function resolveExtraToolbarContentForView($viewClassName, $controllerId, $moduleId, $modelId)
248  {
249  return null;
250  }
251 
252  public function resolveColumnAdapterClassNameForView($viewClassName, $columnInformation)
253  {
254  return ucfirst($columnInformation['type']) . 'ListViewColumnAdapter';
255  }
256 
257  public function resolveLeadToAccountCustomAttributesWithNoPostData(Contact $contact,
258  Account $account, array $postData)
259  {
260  return $account;
261  }
262 
263  public function resolveLeadToOpportunityCustomAttributesWithNoPostData(Contact $contact,
264  Opportunity $opportunity, array $postData)
265  {
266  return $opportunity;
267  }
268 
269  public function resolveOpportunityCustomActionsBeforeSave($model)
270  {
271  }
272 
273  public function resolveCustomTranslatedAttributeLabelsByModelClassName($modelClassName, $language)
274  {
275  return array();
276  }
277 
278  public function resolveAccountCustomActionsBeforeSave($model)
279  {
280  }
281 
282  public function resolveOpportunityCustomActionsBeforeDelete($model)
283  {
284  }
285 
286  public function resolveOpportunityCustomActionsAfterSave($model)
287  {
288  }
289 
290  public function resolveOpportunityCustomActionsOnModified($model)
291  {
292  }
293 
294  public function resolveOpportunityIsCacheable()
295  {
296  return true;
297  }
298 
299  public function resolveOpportunitiesReportRulesCustomMetadata(&$metadata)
300  {
301  }
302 
303  public function resolveAccountsReportRulesCustomMetadata(&$metadata)
304  {
305  }
306  }
307 ?>
addErrorMessage($message)
static registerTaskModalDetailsScript($sourceId)
Definition: TasksUtil.php:515
runAfterInstallationDefaultDataLoad(MessageLogger $messageLogger)
resolveTaskModalButtonColumnClassNameForTasksMyListView()
setCalendarItemTitle(CalendarItem $calendarItem, RedBeanModel $model)
static getChoppedStringContent($string, $length, $ellipsis= '...')
Definition: StringUtil.php:51
resolveThumbnailForFeaturedEmailTemplate(EmailTemplate $emailTemplate)
renderHeadContentForPortletOnDetailsAndRelationsView($viewClassName, $params, $defaultOptionsContent, $parentContent)
static registerOpenToTaskModalDetailsScript($taskId, $sourceId)
Definition: TasksUtil.php:548
resolveKanbanCardColumns($columns)
Definition: Task.php:37
resolveComponentRulesClassNameByModule($moduleClassName, $rulesName)
runBeforeInstallationAutoBuildDatabase(MessageLogger $messageLogger)
registerOpenToTaskModalDetailsScript($taskId, $sourceId)
resolveDataProviderClassNameForControllerBySearchModel($searchModel)
registerTaskModalDetailsScript($gridViewId)
runImportsForImportCommand(ImportMessageLogger $messageLogger, $importName=null)
renderKanbanSearchView($searchFormModel, $params)
renderExtraAttributesWithNameInKanbanCard($cardColumns, Task $task, $row)
resolveRowMenuColumnClassForOpenTaskPortlet($relationAttributeName)
Generated on Sun May 24 2020 07:10:26