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 #5638 from JKingsnorth/CRM-16227b
[civicrm-core.git]
/
CRM
/
Core
/
Page.php
diff --git
a/CRM/Core/Page.php
b/CRM/Core/Page.php
index d35d792434ad44e9e3ba1aa40432a038bd2068a5..0dd6d871420d942888f896d756681ce9cac5c3be 100644
(file)
--- a/
CRM/Core/Page.php
+++ b/
CRM/Core/Page.php
@@
-3,7
+3,7
@@
+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
4
|
+ | Copyright CiviCRM LLC (c) 2004-201
5
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-23,12
+23,12
@@
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+
*/
/**
*
* @package CRM
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-201
4
+ * @copyright CiviCRM LLC (c) 2004-201
5
* $Id$
*
*/
* $Id$
*
*/
@@
-51,7
+51,7
@@
class CRM_Core_Page {
protected $_name;
/**
protected $_name;
/**
- * The title associated with this page
+ * The title associated with this page
.
*
* @var object
*/
*
* @var object
*/
@@
-116,7
+116,7
@@
class CRM_Core_Page {
public $useLivePageJS;
/**
public $useLivePageJS;
/**
- * Class constructor
+ * Class constructor
.
*
* @param string $title
* Title of the page.
*
* @param string $title
* Title of the page.
@@
-162,12
+162,15
@@
class CRM_Core_Page {
/**
* This function takes care of all the things common to all
/**
* This function takes care of all the things common to all
- * pages. This typically involves assigning the appropriate
- * smarty variable :)
+ * pages. This typically involves assigning the appropriate smarty
+ * variable :)
+ *
+ * @return void|string
+ * The content generated by running this page
*/
public function run() {
if ($this->_embedded) {
*/
public function run() {
if ($this->_embedded) {
- return;
+ return
NULL
;
}
self::$_template->assign('mode', $this->_mode);
}
self::$_template->assign('mode', $this->_mode);
@@
-183,7
+186,7
@@
class CRM_Core_Page {
CRM_Core_Smarty::PRINT_SNIPPET,
CRM_Core_Smarty::PRINT_PDF,
CRM_Core_Smarty::PRINT_NOFORM,
CRM_Core_Smarty::PRINT_SNIPPET,
CRM_Core_Smarty::PRINT_PDF,
CRM_Core_Smarty::PRINT_NOFORM,
- CRM_Core_Smarty::PRINT_JSON
+ CRM_Core_Smarty::PRINT_JSON
,
))) {
$content = self::$_template->fetch('CRM/common/snippet.tpl');
}
))) {
$content = self::$_template->fetch('CRM/common/snippet.tpl');
}
@@
-242,7
+245,7
@@
class CRM_Core_Page {
}
/**
}
/**
- * Store the variable with the value in the form scope
+ * Store the variable with the value in the form scope
.
*
* @param string|array $name name of the variable or an assoc array of name/value pairs
* @param mixed $value
*
* @param string|array $name name of the variable or an assoc array of name/value pairs
* @param mixed $value
@@
-256,10
+259,9
@@
class CRM_Core_Page {
}
/**
}
/**
- * Get the variable from the form scope
- *
- * @param string name : name of the variable
+ * Get the variable from the form scope.
*
*
+ * @param string $name name of the variable
*
* @return mixed
*/
*
* @return mixed
*/
@@
-268,7
+270,7
@@
class CRM_Core_Page {
}
/**
}
/**
- * Assign value to name in template
+ * Assign value to name in template
.
*
* @param string $var
* @param mixed $value
*
* @param string $var
* @param mixed $value
@@
-281,7
+283,7
@@
class CRM_Core_Page {
}
/**
}
/**
- * Assign value to name in template by reference
+ * Assign value to name in template by reference
.
*
* @param string $var
* @param mixed $value
*
* @param string $var
* @param mixed $value
@@
-294,7
+296,7
@@
class CRM_Core_Page {
}
/**
}
/**
- * Appends values to template variables
+ * Appends values to template variables
.
*
* @param array|string $tpl_var the template variable name(s)
* @param mixed $value
*
* @param array|string $tpl_var the template variable name(s)
* @param mixed $value
@@
-306,7
+308,7
@@
class CRM_Core_Page {
}
/**
}
/**
- * Returns an array containing template variables
+ * Returns an array containing template variables
.
*
* @param string $name
*
*
* @param string $name
*
@@
-327,14
+329,17
@@
class CRM_Core_Page {
}
/**
}
/**
- * Use the form name to create the tpl file name
+ * Use the form name to create the tpl file name
.
*
* @return string
*/
public function getTemplateFileName() {
*
* @return string
*/
public function getTemplateFileName() {
- return str_replace('_',
- DIRECTORY_SEPARATOR,
- CRM_Utils_System::getClassName($this)
+ return strtr(
+ CRM_Utils_System::getClassName($this),
+ array(
+ '_' => DIRECTORY_SEPARATOR,
+ '\\' => DIRECTORY_SEPARATOR,
+ )
) . '.tpl';
}
) . '.tpl';
}
@@
-359,7
+364,7
@@
class CRM_Core_Page {
}
/**
}
/**
- * Setter for embedded
+ * Setter for embedded
.
*
* @param bool $embedded
*
*
* @param bool $embedded
*
@@
-370,9
+375,9
@@
class CRM_Core_Page {
}
/**
}
/**
- * Getter for embedded
+ * Getter for embedded
.
*
*
- * @return bool
ean
+ * @return bool
* return the embedded value
*/
public function getEmbedded() {
* return the embedded value
*/
public function getEmbedded() {
@@
-380,7
+385,7
@@
class CRM_Core_Page {
}
/**
}
/**
- * Setter for print
+ * Setter for print
.
*
* @param bool $print
*
*
* @param bool $print
*
@@
-391,9
+396,9
@@
class CRM_Core_Page {
}
/**
}
/**
- * Getter for print
+ * Getter for print
.
*
*
- * @return bool
ean
+ * @return bool
* return the print value
*/
public function getPrint() {
* return the print value
*/
public function getPrint() {
@@
-423,4
+428,5
@@
class CRM_Core_Page {
public function setVar($name, $value) {
$this->$name = $value;
}
public function setVar($name, $value) {
$this->$name = $value;
}
+
}
}