Passed
Push — developer ( 3d2969...249ff2 )
by Radosław
18:02
created

SMSTemplates   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
eloc 27
c 1
b 0
f 0
dl 0
loc 64
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A moduleHandler() 0 7 6
1
<?php
2
/**
3
 * Main module file.
4
 *
5
 * @package CRMEntity
6
 *
7
 * @copyright YetiForce S.A.
8
 * @license   YetiForce Public License 5.0 (licenses/LicenseEN.txt or yetiforce.com)
9
 * @author    Radosław Skrzypczak <[email protected]>
10
 */
11
include_once 'modules/Vtiger/CRMEntity.php';
12
/**
13
 * SMS templates class.
14
 */
15
class SMSTemplates extends Vtiger_CRMEntity
16
{
17
	/** @var string Table name */
18
	public $table_name = 'u_yf_smstemplates';
19
	/** @var string Table index */
20
	public $table_index = 'smstemplatesid';
21
22
	/** @var array Mandatory table for supporting custom fields. */
23
	public $customFieldTable = ['u_yf_smstemplatescf', 'smstemplatesid'];
24
25
	/** @var array Mandatory for Saving, Include tables related to this module. */
26
	public $tab_name = ['vtiger_crmentity', 'u_yf_smstemplates', 'u_yf_smstemplatescf'];
27
28
	/** @var array Mandatory for Saving, Include tablename and tablekey columnname here. */
29
	public $tab_name_index = [
30
		'vtiger_crmentity' => 'crmid',
31
		'u_yf_smstemplates' => 'smstemplatesid',
32
		'u_yf_smstemplatescf' => 'smstemplatesid',
33
	];
34
35
	/** @var array Default fields on the list */
36
	public $list_fields_name = [
37
		'FL_SUBJECT' => 'subject',
38
		'Assigned To' => 'assigned_user_id',
39
	];
40
41
	/** @var array For Popup listview and UI type support */
42
	public $search_fields = [
43
		'FL_SUBJECT' => ['smstemplates', 'subject'],
44
		'Assigned To' => ['vtiger_crmentity', 'assigned_user_id'],
45
	];
46
	/** @var array */
47
	public $search_fields_name = [];
48
	/** @var array For Popup window record selection */
49
	public $popup_fields = ['subject'];
50
	/** @var string For Alphabetical search */
51
	public $def_basicsearch_col = 'subject';
52
	/** @var string Column value to use on detail view record text display */
53
	public $def_detailview_recname = 'subject';
54
	/**
55
	 * Used when enabling/disabling the mandatory fields for the module.
56
	 * Refers to vtiger_field.fieldname values.
57
	 *
58
	 * @var array
59
	 */
60
	public $mandatory_fields = ['subject', 'assigned_user_id'];
61
	/** @var string Default field for sorting */
62
	public $default_order_by = '';
63
	/** @var string Default sort order */
64
	public $default_sort_order = 'ASC';
65
66
	/**
67
	 * Invoked when special actions are performed on the module.
68
	 *
69
	 * @param string $moduleName Module name
70
	 * @param string $eventType  Event Type
71
	 */
72
	public function moduleHandler($moduleName, $eventType)
73
	{
74
		if ('module.postinstall' === $eventType) {
75
		} elseif ('module.disabled' === $eventType) {
76
		} elseif ('module.preuninstall' === $eventType) {
77
		} elseif ('module.preupdate' === $eventType) {
78
		} elseif ('module.postupdate' === $eventType) {
79
		}
80
	}
81
}
82