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 #22873 from civicrm/5.47
[civicrm-core.git]
/
CRM
/
Core
/
Page.php
diff --git
a/CRM/Core/Page.php
b/CRM/Core/Page.php
index 99742ac99ca04821a3c156a9cebe8512aa744363..4194e9bda745fc8723da13dbe115797fd587c827 100644
(file)
--- a/
CRM/Core/Page.php
+++ b/
CRM/Core/Page.php
@@
-59,7
+59,9
@@
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
+ * @var int|string
+ * Should match a CRM_Core_Smarty::PRINT_* constant,
+ * or equal 0 if not in print mode
*/
protected $_print = FALSE;
*/
protected $_print = FALSE;
@@
-124,6
+126,12
@@
class CRM_Core_Page {
'breadcrumb',
'pageTitle',
'isDeleted',
'breadcrumb',
'pageTitle',
'isDeleted',
+ // Required for footer.tpl,
+ // See ExampleHookTest:testPageOutput.
+ 'footer_status_severity',
+ // in 'body.tpl
+ 'suppressForm',
+ 'beginHookFormElements',
];
/**
];
/**
@@
-215,10
+223,10
@@
class CRM_Core_Page {
//its time to call the hook.
CRM_Utils_Hook::alterContent($content, 'page', $pageTemplateFile, $this);
//its time to call the hook.
CRM_Utils_Hook::alterContent($content, 'page', $pageTemplateFile, $this);
- if ($this->_print == CRM_Core_Smarty::PRINT_PDF) {
+ if ($this->_print ==
=
CRM_Core_Smarty::PRINT_PDF) {
CRM_Utils_PDF_Utils::html2pdf($content, "{$this->_name}.pdf", FALSE);
}
CRM_Utils_PDF_Utils::html2pdf($content, "{$this->_name}.pdf", FALSE);
}
- elseif ($this->_print == CRM_Core_Smarty::PRINT_JSON) {
+ elseif ($this->_print ==
=
CRM_Core_Smarty::PRINT_JSON) {
$this->ajaxResponse['content'] = $content;
CRM_Core_Page_AJAX::returnJsonResponse($this->ajaxResponse);
}
$this->ajaxResponse['content'] = $content;
CRM_Core_Page_AJAX::returnJsonResponse($this->ajaxResponse);
}
@@
-386,7
+394,11
@@
class CRM_Core_Page {
/**
* Setter for print.
*
/**
* Setter for print.
*
- * @param bool $print
+ * @param int|string $print
+ * Should match a CRM_Core_Smarty::PRINT_* constant,
+ * or equal 0 if not in print mode
+ *
+ * @return void
*/
public function setPrint($print) {
$this->_print = $print;
*/
public function setPrint($print) {
$this->_print = $print;
@@
-395,8
+407,9
@@
class CRM_Core_Page {
/**
* Getter for print.
*
/**
* Getter for print.
*
- * @return bool
- * return the print value
+ * @return int|string
+ * Value matching a CRM_Core_Smarty::PRINT_* constant,
+ * or 0 if not in print mode
*/
public function getPrint() {
return $this->_print;
*/
public function getPrint() {
return $this->_print;