All Data Structures Functions Variables Pages
ContactWebFormsModule.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  const RIGHT_CREATE_CONTACT_WEB_FORMS = 'Create Contact Web Forms';
40 
41  const RIGHT_DELETE_CONTACT_WEB_FORMS = 'Delete Contact Web Forms';
42 
43  const RIGHT_ACCESS_CONTACT_WEB_FORMS = 'Access Contact Web Forms Tab';
44 
48  public function getDependencies()
49  {
50  return array(
51  'contacts',
52  );
53  }
54 
58  public function getRootModelNames()
59  {
60  return array('ContactWebForm', 'ContactWebFormEntry');
61  }
62 
66  public static function getTranslatedRightsLabels()
67  {
69  $labels = array();
70  $labels[self::RIGHT_CREATE_CONTACT_WEB_FORMS] = Zurmo::t('ContactWebFormsModule',
71  'Create ContactsModuleSingularLabel Web Forms', $params);
72  $labels[self::RIGHT_DELETE_CONTACT_WEB_FORMS] = Zurmo::t('ContactWebFormsModule',
73  'Delete ContactsModuleSingularLabel Web Forms', $params);
74  $labels[self::RIGHT_ACCESS_CONTACT_WEB_FORMS] = Zurmo::t('ContactWebFormsModule',
75  'Access ContactsModuleSingularLabel Web Forms Tab', $params);
76  return $labels;
77  }
78 
82  public static function getDefaultMetadata()
83  {
84  $metadata = array();
85  $metadata['global'] = array(
86  'designerMenuItems' => array(),
87  'globalSearchAttributeNames' => array('webFormName'),
88  'adminTabMenuItems' => array(
89  array(
90  'label' => "eval:Zurmo::t('ContactWebFormsModule', 'Web Forms')",
91  'url' => array('/contactWebForms/default'),
92  'right' => self::RIGHT_ACCESS_CONTACT_WEB_FORMS,
93  ),
94  ),
95  'configureMenuItems' => array(
96  array(
97  'category' => ZurmoModule::ADMINISTRATION_CATEGORY_GENERAL,
98  'titleLabel' => "eval:Zurmo::t('ContactWebFormsModule', 'Web Forms')",
99  'descriptionLabel' => "eval:Zurmo::t('ContactWebFormsModule', 'Manage Web Forms')",
100  'route' => '/contactWebForms/default',
101  'right' => self::RIGHT_CREATE_CONTACT_WEB_FORMS,
102  ),
103  )
104  );
105  return $metadata;
106  }
107 
111  public static function getPrimaryModelName()
112  {
113  return 'ContactWebForm';
114  }
115 
119  public static function getAccessRight()
120  {
121  return self::RIGHT_ACCESS_CONTACT_WEB_FORMS;
122  }
123 
127  public static function getCreateRight()
128  {
129  return self::RIGHT_CREATE_CONTACT_WEB_FORMS;
130  }
131 
135  public static function getDeleteRight()
136  {
137  return self::RIGHT_DELETE_CONTACT_WEB_FORMS;
138  }
139 
143  public static function getGlobalSearchFormClassName()
144  {
145  return 'ContactWebFormsSearchForm';
146  }
147 
151  public static function hasPermissions()
152  {
153  return true;
154  }
155 
159  public static function modelsAreNeverGloballySearched()
160  {
161  return true;
162  }
163 
167  public static function getDemoDataMakerClassNames()
168  {
169  return array('ContactWebFormDemoDataMaker', 'ContactWebFormEntryDemoDataMaker');
170  }
171 
176  protected static function getSingularModuleLabel($language)
177  {
178  return Zurmo::t('ContactWebFormsModule', 'Contact Web Form', array(), null, $language);
179  }
180 
185  protected static function getPluralModuleLabel($language)
186  {
187  return Zurmo::t('ContactWebFormsModule', 'Contact Web Forms', array(), null, $language);
188  }
189  }
190 ?>
static getPluralModuleLabel($language)
static getTranslationParamsForAllModules()
Definition: LabelUtil.php:75
static getSingularModuleLabel($language)
Generated on Fri Jun 5 2020 07:10:30