projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Short array syntax - auto-convert api dir
[civicrm-core.git]
/
api
/
v3
/
examples
/
MessageTemplate
/
Get.php
diff --git
a/api/v3/examples/MessageTemplate/Get.php
b/api/v3/examples/MessageTemplate/Get.php
index 318d8aada33c7eccc6622c6919dbe2422fd26214..d29e2073f7ec6a0a1bfff9fd2023ec5d78b65362 100644
(file)
--- a/
api/v3/examples/MessageTemplate/Get.php
+++ b/
api/v3/examples/MessageTemplate/Get.php
@@
-6,7
+6,7
@@
* API result array
*/
function message_template_get_example() {
* API result array
*/
function message_template_get_example() {
- $params =
array(
+ $params =
[
'msg_title' => 'msg_title_285',
'msg_subject' => 'msg_subject_285',
'msg_text' => 'msg_text_285',
'msg_title' => 'msg_title_285',
'msg_subject' => 'msg_subject_285',
'msg_text' => 'msg_text_285',
@@
-14,7
+14,7
@@
function message_template_get_example() {
'workflow_id' => 285,
'is_default' => '1',
'is_reserved' => 1,
'workflow_id' => 285,
'is_default' => '1',
'is_reserved' => 1,
-
)
;
+
]
;
try{
$result = civicrm_api3('MessageTemplate', 'get', $params);
try{
$result = civicrm_api3('MessageTemplate', 'get', $params);
@@
-24,12
+24,12
@@
function message_template_get_example() {
$errorMessage = $e->getMessage();
$errorCode = $e->getErrorCode();
$errorData = $e->getExtraParams();
$errorMessage = $e->getMessage();
$errorCode = $e->getErrorCode();
$errorData = $e->getExtraParams();
- return
array(
+ return
[
'is_error' => 1,
'error_message' => $errorMessage,
'error_code' => $errorCode,
'error_data' => $errorData,
'is_error' => 1,
'error_message' => $errorMessage,
'error_code' => $errorCode,
'error_data' => $errorData,
-
)
;
+
]
;
}
return $result;
}
return $result;
@@
-43,13
+43,13
@@
function message_template_get_example() {
*/
function message_template_get_expectedresult() {
*/
function message_template_get_expectedresult() {
- $expectedResult =
array(
+ $expectedResult =
[
'is_error' => 0,
'version' => 3,
'count' => 1,
'id' => 70,
'is_error' => 0,
'version' => 3,
'count' => 1,
'id' => 70,
- 'values' =>
array(
- '70' =>
array(
+ 'values' =>
[
+ '70' =>
[
'id' => '70',
'msg_title' => 'msg_title_285',
'msg_subject' => 'msg_subject_285',
'id' => '70',
'msg_title' => 'msg_title_285',
'msg_subject' => 'msg_subject_285',
@@
-61,9
+61,9
@@
function message_template_get_expectedresult() {
'is_reserved' => '1',
'is_sms' => '1',
'pdf_format_id' => '285',
'is_reserved' => '1',
'is_sms' => '1',
'pdf_format_id' => '285',
-
)
,
-
)
,
-
)
;
+
]
,
+
]
,
+
]
;
return $expectedResult;
}
return $expectedResult;
}