*
* @package CRM
* @copyright CiviCRM LLC https://civicrm.org/licensing
- * $Id$
- *
*/
/**
* @param
*
* @return void
+ * @throws \CRM_Core_Exception
*/
public function preProcess() {
self::preProcessCommon($this);
/**
* @param CRM_Core_Form $form
+ *
+ * @throws \CRM_Core_Exception
*/
public static function preProcessCommon(&$form) {
$form->_memberIds = [];
$form->assign('taskName', $tasks[$form->_task]);
$ids = [];
- if ($values['radio_ts'] == 'ts_sel') {
+ if ($values['radio_ts'] === 'ts_sel') {
foreach ($values as $name => $value) {
if (substr($name, 0, CRM_Core_Form::CB_PREFIX_LEN) == CRM_Core_Form::CB_PREFIX) {
$ids[] = substr($name, CRM_Core_Form::CB_PREFIX_LEN);
}
$searchFormName = strtolower($form->get('searchFormName'));
- if ($searchFormName == 'search') {
+ if ($searchFormName === 'search') {
$session->replaceUserContext(CRM_Utils_System::url('civicrm/member/search', $urlParams));
}
else {
);
}
- /**
- * Simple shell that derived classes can call to add buttons to.
- * the form with a customized title for the main Submit
- *
- * @param string $title
- * Title of the main button.
- * @param string $nextType
- * @param string $backType
- * @param bool $submitOnce
- *
- * @return void
- */
- public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
- $this->addButtons([
- [
- 'type' => $nextType,
- 'name' => $title,
- 'isDefault' => TRUE,
- ],
- [
- 'type' => $backType,
- 'name' => ts('Cancel'),
- ],
- ]);
- }
-
}