This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Copyright 2015 SugarCRM Inc. | |
*/ | |
require_once 'custom/modules/Accounts/AccountsOnSaveHooks.php'; | |
/** | |
* Example tests for our custom Logic Hook. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Copyright 2015 SugarCRM Inc. | |
*/ | |
/** | |
* Example of a module logic hook that we will unit test | |
*/ | |
if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Basic Jasmine test template for any Sugar 7 view | |
*/ | |
ddescribe("Jasmine template for Sugar 7 views", function () { | |
/* | |
* Some useful constants for our tests. | |
* We use them to keep track of the module, layout, and view we are testing | |
*/ | |
var moduleName = 'Accounts'; //TODO CHANGE TO AN APPROPRIATE MODULE | |
var viewName = "CHANGE_ME"; //TODO CHANGE TO YOUR VIEW NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Basic Jasmine tests for Case Count by Status dashlet | |
*/ | |
ddescribe("Case Count by Status", function () { | |
/* | |
* Some useful constants for our tests. | |
* We use them to keep track of the module, layout, and view we are testing | |
*/ | |
var moduleName = 'Cases'; | |
var viewName = 'case-count-by-status'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This file will provide English strings for our new labels. | |
// Additional extensions could be created so that our dashlet supports other languages. | |
$app_strings['LBL_CASE_COUNT_BY_STATUS'] = 'Case Count By Status'; | |
$app_strings['LBL_CASE_COUNT_BY_STATUS_DESCRIPTION'] = 'Shows the number of Cases on the Cases List view by status.'; | |
$app_strings['LBL_CASE_COUNT_BY_STATUS_TOTAL'] = 'Total Cases:'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Case Count by Status example dashlet controller | |
* | |
* Controller logic watches the current collection on display and updates the | |
* dashlet automatically whenever the current collection changes. | |
* | |
* This is a simple example of a dashlet for List Views in Sugar 7.x. | |
* | |
**/ | |
({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Metadata for the Case Count by Status example dashlet view | |
* | |
* This dashlet is only allowed to appear on the Case module's list view | |
* which is also known as the 'records' layout. | |
*/ | |
$viewdefs['base']['view']['case-count-by-status'] = array( | |
'dashlets' => array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | |
/** | |
* Example Mobile API Logic Hooks class | |
**/ | |
class MobileApiLogicHook | |
{ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | |
require_once 'clients/mobile/api/OAuth2MobileApi.php'; | |
/** | |
* Example of how to override the core OAuth2MobileApi class in order to alter SugarCRM Mobile authentication behavior | |
**/ | |
class RestrictedOAuth2MobileApi extends OAuth2MobileApi { |