X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FSelector%2FController.php;h=6a1577fba0aca53744d2004b462b1dba8cf7084f;hb=4846df9154866b0a33ee8ec7a1f48c65c77b670b;hp=aa86c2271a0b4b89481a0db1359679d6657b5b91;hpb=3b16a28270778af5122d850f6a4ee7400b8f9920;p=civicrm-core.git diff --git a/CRM/Core/Selector/Controller.php b/CRM/Core/Selector/Controller.php index aa86c2271a..6a1577fba0 100644 --- a/CRM/Core/Selector/Controller.php +++ b/CRM/Core/Selector/Controller.php @@ -1,7 +1,7 @@ _object = $object; $this->_pageID = $pageID ? $pageID : 1; $this->_sortID = $sortID ? $sortID : NULL; $this->_action = $action; - $this->_store = $store; + $this->_store = $store; $this->_output = $output; $this->_prefix = $prefix; - $this->_case = $case; + $this->_case = $case; // fix sortID if ($this->_sortID && strpos($this->_sortID, '_') === FALSE) { @@ -252,12 +255,13 @@ class CRM_Core_Selector_Controller { /** * Have the GET vars changed, i.e. pageId or sortId that forces us to recompute the search values * - * @param int $reset are we being reset + * @param int $reset + * Are we being reset. * - * @return boolean if the GET params are different from the session params - * @access public + * @return bool + * if the GET params are different from the session params */ - function hasChanged($reset) { + public function hasChanged($reset) { /** * if we are in reset state, i.e the store is cleaned out, we return false @@ -294,9 +298,8 @@ class CRM_Core_Selector_Controller { * * * @return void - * */ - function run() { + public function run() { // get the column headers $columnHeaders = &$this->_object->getColumnHeaders($this->_action, $this->_output); @@ -337,8 +340,8 @@ class CRM_Core_Selector_Controller { $rows = self::getRows($this); CRM_Utils_Hook::searchColumns($contextName, $columnHeaders, $rows, $this); $rowsEmpty = count($rows) ? FALSE : TRUE; - $qill = $this->getQill(); - $summary = $this->getSummary(); + $qill = $this->getQill(); + $summary = $this->getSummary(); // if we need to store in session, lets update session if ($this->_output & self::SESSION) { $this->_store->set("{$this->_prefix}columnHeaders", $columnHeaders); @@ -362,7 +365,6 @@ class CRM_Core_Selector_Controller { self::$_template->assign("{$this->_prefix}summary", $summary); } - // always store the current pageID and sortID $this->_store->set($this->_prefix . CRM_Utils_Pager::PAGE_ID, $this->_pager->getCurrentPageID() @@ -387,8 +389,8 @@ class CRM_Core_Selector_Controller { * * @param CRM_Core_Form $form * - * @return array of rows - * @access public + * @return array + * Array of rows */ public function getRows($form) { if ($form->_output == self::EXPORT || $form->_output == self::SCREEN) { @@ -406,8 +408,8 @@ class CRM_Core_Selector_Controller { * Default function for qill, if needed to be implemented, we * expect the subclass to do it * - * @return string the status message - * @access public + * @return string + * the status message */ public function getQill() { return $this->_object->getQill(); @@ -421,32 +423,29 @@ class CRM_Core_Selector_Controller { } /** - * Getter for pager + * Getter for pager. * * @return CRM_Utils_Pager - * @access public */ - function getPager() { + public function getPager() { return $this->_pager; } /** - * Getter for sort + * Getter for sort. * * @return CRM_Utils_Sort - * @access public */ - function getSort() { + public function getSort() { return $this->_sort; } /** - * Move the variables from the session to the template + * Move the variables from the session to the template. * * @return void - * @access public */ - function moveFromSessionToTemplate() { + public function moveFromSessionToTemplate() { self::$_template->assign_by_ref("{$this->_prefix}pager", $this->_pager); $rows = $this->_store->get("{$this->_prefix}rows"); @@ -484,61 +483,59 @@ class CRM_Core_Selector_Controller { } /** - * Setter for embedded + * Setter for embedded. * - * @param boolean $embedded + * @param bool $embedded * * @return void - * @access public */ - function setEmbedded($embedded) { + public function setEmbedded($embedded) { $this->_embedded = $embedded; } /** - * Getter for embedded + * Getter for embedded. * - * @return boolean return the embedded value - * @access public + * @return bool + * return the embedded value */ - function getEmbedded() { + public function getEmbedded() { return $this->_embedded; } /** - * Setter for print + * Setter for print. * - * @param boolean $print + * @param bool $print * * @return void - * @access public */ - function setPrint($print) { + public function setPrint($print) { $this->_print = $print; } /** - * Getter for print + * Getter for print. * - * @return boolean return the print value - * @access public + * @return bool + * return the print value */ - function getPrint() { + public function getPrint() { return $this->_print; } /** * @param $value */ - function setDynamicAction($value) { + public function setDynamicAction($value) { $this->_dynamicAction = $value; } /** * @return bool */ - function getDynamicAction() { + public function getDynamicAction() { return $this->_dynamicAction; } -} +}