projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #14353 from eileenmcnaughton/fin_accounts_pi
[civicrm-core.git]
/
CRM
/
Core
/
Page.php
diff --git
a/CRM/Core/Page.php
b/CRM/Core/Page.php
index 54b0ef6ff0a338baf45bb83409d8401da106c561..145c91af53352081c761e203fa89511e411f4e26 100644
(file)
--- a/
CRM/Core/Page.php
+++ b/
CRM/Core/Page.php
@@
-3,7
+3,7
@@
+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
8
|
+ | Copyright CiviCRM LLC (c) 2004-201
9
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-28,7
+28,7
@@
/**
*
* @package CRM
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-201
8
+ * @copyright CiviCRM LLC (c) 2004-201
9
*/
/**
*/
/**
@@
-67,7
+67,7
@@
class CRM_Core_Page {
* so the display routine needs to not do any work. (The
* parent object takes care of the display)
*
* so the display routine needs to not do any work. (The
* parent object takes care of the display)
*
- * @var bool
ean
+ * @var bool
*/
protected $_embedded = FALSE;
*/
protected $_embedded = FALSE;
@@
-75,7
+75,7
@@
class CRM_Core_Page {
* Are we in print mode? if so we need to modify the display
* functionality to do a minimal display :)
*
* Are we in print mode? if so we need to modify the display
* functionality to do a minimal display :)
*
- * @var bool
ean
+ * @var bool
*/
protected $_print = FALSE;
*/
protected $_print = FALSE;
@@
-98,14
+98,14
@@
class CRM_Core_Page {
*
* @var array
*/
*
* @var array
*/
- public $ajaxResponse =
array()
;
+ public $ajaxResponse =
[]
;
/**
* Url path used to reach this page
*
* @var array
*/
/**
* Url path used to reach this page
*
* @var array
*/
- public $urlPath =
array()
;
+ public $urlPath =
[]
;
/**
* Should crm.livePage.js be added to the page?
/**
* Should crm.livePage.js be added to the page?
@@
-144,7
+144,7
@@
class CRM_Core_Page {
$this->_print = CRM_Core_Smarty::PRINT_NOFORM;
}
// Support 'json' as well as legacy value '6'
$this->_print = CRM_Core_Smarty::PRINT_NOFORM;
}
// Support 'json' as well as legacy value '6'
- elseif (in_array($_REQUEST['snippet'],
array(CRM_Core_Smarty::PRINT_JSON, 6)
)) {
+ elseif (in_array($_REQUEST['snippet'],
[CRM_Core_Smarty::PRINT_JSON, 6]
)) {
$this->_print = CRM_Core_Smarty::PRINT_JSON;
}
else {
$this->_print = CRM_Core_Smarty::PRINT_JSON;
}
else {
@@
-177,12
+177,12
@@
class CRM_Core_Page {
CRM_Utils_Hook::pageRun($this);
if ($this->_print) {
CRM_Utils_Hook::pageRun($this);
if ($this->_print) {
- if (in_array($this->_print,
array(
+ if (in_array($this->_print,
[
CRM_Core_Smarty::PRINT_SNIPPET,
CRM_Core_Smarty::PRINT_PDF,
CRM_Core_Smarty::PRINT_NOFORM,
CRM_Core_Smarty::PRINT_JSON,
CRM_Core_Smarty::PRINT_SNIPPET,
CRM_Core_Smarty::PRINT_PDF,
CRM_Core_Smarty::PRINT_NOFORM,
CRM_Core_Smarty::PRINT_JSON,
-
)
)) {
+
]
)) {
$content = self::$_template->fetch('CRM/common/snippet.tpl');
}
else {
$content = self::$_template->fetch('CRM/common/snippet.tpl');
}
else {
@@
-199,7
+199,7
@@
class CRM_Core_Page {
if ($this->_print == CRM_Core_Smarty::PRINT_PDF) {
CRM_Utils_PDF_Utils::html2pdf($content, "{$this->_name}.pdf", FALSE,
if ($this->_print == CRM_Core_Smarty::PRINT_PDF) {
CRM_Utils_PDF_Utils::html2pdf($content, "{$this->_name}.pdf", FALSE,
- array('paper_size' => 'a3', 'orientation' => 'landscape')
+ ['paper_size' => 'a3', 'orientation' => 'landscape']
);
}
elseif ($this->_print == CRM_Core_Smarty::PRINT_JSON) {
);
}
elseif ($this->_print == CRM_Core_Smarty::PRINT_JSON) {
@@
-317,10
+317,10
@@
class CRM_Core_Page {
public function getTemplateFileName() {
return strtr(
CRM_Utils_System::getClassName($this),
public function getTemplateFileName() {
return strtr(
CRM_Utils_System::getClassName($this),
- array(
+ [
'_' => DIRECTORY_SEPARATOR,
'\\' => DIRECTORY_SEPARATOR,
'_' => DIRECTORY_SEPARATOR,
'\\' => DIRECTORY_SEPARATOR,
- )
+ ]
) . '.tpl';
}
) . '.tpl';
}
@@
-420,8
+420,8
@@
class CRM_Core_Page {
* @throws \CiviCRM_API3_Exception
*/
protected function assignFieldMetadataToTemplate($entity) {
* @throws \CiviCRM_API3_Exception
*/
protected function assignFieldMetadataToTemplate($entity) {
- $fields = civicrm_api3($entity, 'getfields',
array('action' => 'get')
);
- $dateFields =
array()
;
+ $fields = civicrm_api3($entity, 'getfields',
['action' => 'get']
);
+ $dateFields =
[]
;
foreach ($fields['values'] as $fieldName => $fieldMetaData) {
if (isset($fieldMetaData['html']) && CRM_Utils_Array::value('type', $fieldMetaData['html']) == 'Select Date') {
$dateFields[$fieldName] = CRM_Utils_Date::addDateMetadataToField($fieldMetaData, $fieldMetaData);
foreach ($fields['values'] as $fieldName => $fieldMetaData) {
if (isset($fieldMetaData['html']) && CRM_Utils_Array::value('type', $fieldMetaData['html']) == 'Select Date') {
$dateFields[$fieldName] = CRM_Utils_Date::addDateMetadataToField($fieldMetaData, $fieldMetaData);