X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPage.php;h=f77dfa0b12d4c5ebbb0de0ca28ce6333071a3dda;hb=4bf0b605aee4f59a5f7dbfb42f316ae8f0d1fec7;hp=f2de786a2cb0da4635b5a73c29dff24382ccd7c4;hpb=64e59809d10c3ff342718a28f42983ec217dc282;p=civicrm-core.git diff --git a/CRM/Core/Page.php b/CRM/Core/Page.php index f2de786a2c..f77dfa0b12 100644 --- a/CRM/Core/Page.php +++ b/CRM/Core/Page.php @@ -47,7 +47,6 @@ class CRM_Core_Page { * The name of the page (auto generated from class name) * * @var string - * @access protected */ protected $_name; @@ -55,7 +54,6 @@ class CRM_Core_Page { * The title associated with this page * * @var object - * @access protected */ protected $_title; @@ -63,7 +61,6 @@ class CRM_Core_Page { * A page can have multiple modes. (i.e. displays * a different set of data based on the input * @var int - * @access protected */ protected $_mode; @@ -73,7 +70,6 @@ class CRM_Core_Page { * parent object takes care of the display) * * @var boolean - * @access protected */ protected $_embedded = FALSE; @@ -82,7 +78,6 @@ class CRM_Core_Page { * functionality to do a minimal display :) * * @var boolean - * @access protected */ protected $_print = FALSE; @@ -90,7 +85,6 @@ class CRM_Core_Page { * Cache the smarty template for efficiency reasons * * @var CRM_Core_Smarty - * @access protected * @static */ static protected $_template; @@ -99,7 +93,6 @@ class CRM_Core_Page { * Cache the session for efficiency reasons * * @var CRM_Core_Session - * @access protected * @static */ static protected $_session; @@ -132,7 +125,7 @@ class CRM_Core_Page { * * @return CRM_Core_Page */ - function __construct($title = NULL, $mode = NULL) { + public function __construct($title = NULL, $mode = NULL) { $this->_name = CRM_Utils_System::getClassName($this); $this->_title = $title; $this->_mode = $mode; @@ -172,9 +165,10 @@ class CRM_Core_Page { * pages. This typically involves assigning the appropriate * smarty variable :) * - * @return string The content generated by running this page + * @return string + * The content generated by running this page */ - function run() { + public function run() { if ($this->_embedded) { return; } @@ -253,12 +247,11 @@ class CRM_Core_Page { * @param string|array $name name of the variable or an assoc array of name/value pairs * @param mixed $value value of the variable if string * - * @access public * * @return void * */ - function set($name, $value = NULL) { + public function set($name, $value = NULL) { self::$_session->set($name, $value, $this->_name); } @@ -267,12 +260,11 @@ class CRM_Core_Page { * * @param string name : name of the variable * - * @access public * * @return mixed * */ - function get($name) { + public function get($name) { return self::$_session->get($name, $this->_name); } @@ -283,9 +275,8 @@ class CRM_Core_Page { * @param mixed $value value of varaible * * @return void - * @access public */ - function assign($var, $value = NULL) { + public function assign($var, $value = NULL) { self::$_template->assign($var, $value); } @@ -296,9 +287,8 @@ class CRM_Core_Page { * @param mixed $value (reference) value of varaible * * @return void - * @access public */ - function assign_by_ref($var, &$value) { + public function assign_by_ref($var, &$value) { self::$_template->assign_by_ref($var, $value); } @@ -309,7 +299,7 @@ class CRM_Core_Page { * @param mixed $value the value to append * @param bool $merge */ - function append($tpl_var, $value=NULL, $merge=FALSE) { + public function append($tpl_var, $value=NULL, $merge=FALSE) { self::$_template->append($tpl_var, $value, $merge); } @@ -320,18 +310,17 @@ class CRM_Core_Page { * * @return array */ - function get_template_vars($name=null) { + public function get_template_vars($name=null) { return self::$_template->get_template_vars($name); } /** * Destroy all the session state of this page. * - * @access public * * @return void */ - function reset() { + public function reset() { self::$_session->resetScope($this->_name); } @@ -339,9 +328,8 @@ class CRM_Core_Page { * Use the form name to create the tpl file name * * @return string - * @access public */ - function getTemplateFileName() { + public function getTemplateFileName() { return str_replace('_', DIRECTORY_SEPARATOR, CRM_Utils_System::getClassName($this) @@ -352,7 +340,7 @@ class CRM_Core_Page { * A wrapper for getTemplateFileName that includes calling the hook to * prevent us from having to copy & paste the logic of calling the hook */ - function getHookedTemplateFileName() { + public function getHookedTemplateFileName() { $pageTemplateFile = $this->getTemplateFileName(); CRM_Utils_Hook::alterTemplateFile(get_class($this), $this, 'page', $pageTemplateFile); return $pageTemplateFile; @@ -363,9 +351,8 @@ class CRM_Core_Page { * i.e. we dont override * * @return string - * @access public */ - function overrideExtraTemplateFileName() { + public function overrideExtraTemplateFileName() { return NULL; } @@ -375,9 +362,8 @@ class CRM_Core_Page { * @param boolean $embedded * * @return void - * @access public */ - function setEmbedded($embedded) { + public function setEmbedded($embedded) { $this->_embedded = $embedded; } @@ -385,9 +371,8 @@ class CRM_Core_Page { * Getter for embedded * * @return boolean return the embedded value - * @access public */ - function getEmbedded() { + public function getEmbedded() { return $this->_embedded; } @@ -397,9 +382,8 @@ class CRM_Core_Page { * @param boolean $print * * @return void - * @access public */ - function setPrint($print) { + public function setPrint($print) { $this->_print = $print; } @@ -407,16 +391,15 @@ class CRM_Core_Page { * Getter for print * * @return boolean return the print value - * @access public */ - function getPrint() { + public function getPrint() { return $this->_print; } /** * @return CRM_Core_Smarty */ - static function &getTemplate() { + public static function &getTemplate() { return self::$_template; } @@ -425,7 +408,7 @@ class CRM_Core_Page { * * @return null */ - function getVar($name) { + public function getVar($name) { return isset($this->$name) ? $this->$name : NULL; } @@ -433,8 +416,7 @@ class CRM_Core_Page { * @param string $name * @param $value */ - function setVar($name, $value) { + public function setVar($name, $value) { $this->$name = $value; } } -