*
* @var int
*/
- protected $_limit = NULL;
+ protected $_limit;
/**
* Prefix for the controller.
+ *
* @var string
*/
- protected $_prefix = "grant_";
+ protected $_prefix = 'grant_';
/**
* Metadata of all fields to include on the form.
/**
* Processing needed for buildForm and later.
*
- * @return void
+ * @throws \CRM_Core_Exception
+ * @throws \CiviCRM_API3_Exception
*/
public function preProcess() {
/**
$this->_context
);
$prefix = NULL;
- if ($this->_context == 'user') {
+ if ($this->_context === 'user') {
$prefix = $this->_prefix;
}
/**
* Build the form object.
+ *
+ * @throws \CRM_Core_Exception
+ * @throws \CiviCRM_API3_Exception
*/
public function buildQuickForm() {
parent::buildQuickForm();
* The processing consists of using a Selector / Controller framework for getting the
* search results.
*
- * @param
- *
* @return void
+ * @throws \CRM_Core_Exception
*/
public function postProcess() {
if ($this->_done) {
$this->set('queryParams', $this->_queryParams);
$buttonName = $this->controller->getButtonName();
- if ($buttonName == $this->_actionButtonName) {
+ if ($buttonName === $this->_actionButtonName) {
// check actionName and if next, then do not repeat a search, since we are going to the next page
// hack, make sure we reset the task values
$selector->setKey($this->controller->_key);
$prefix = NULL;
- if ($this->_context == 'basic' || $this->_context == 'user') {
+ if ($this->_context === 'basic' || $this->_context === 'user') {
$prefix = $this->_prefix;
}
$controller->setEmbedded(TRUE);
$query = &$selector->getQuery();
- if ($this->_context == 'user') {
+ if ($this->_context === 'user') {
$query->setSkipPermission(TRUE);
}
$controller->run();
}
+ /**
+ * Hack form values :-(.
+ *
+ * @throws \CRM_Core_Exception
+ */
public function fixFormValues() {
// if this search has been forced
// then see if there are any get values, and if so over-ride the post values
* Get metadata for fields being assigned by metadata.
*
* @return array
+ *
+ * @throws \CiviCRM_API3_Exception
*/
protected function getEntityMetadata() {
return CRM_Grant_BAO_Query::getSearchFieldMetadata();