return 'create';
}
+ /**
+ * Set the active tab
+ *
+ * @param string $default
+ *
+ * @throws \CRM_Core_Exception
+ */
+ public function setSelectedChild($default = NULL) {
+ $selectedChild = CRM_Utils_Request::retrieve('selectedChild', 'Alphanumeric', $this, FALSE, $default);
+ if (!empty($selectedChild)) {
+ $this->set('selectedChild', $selectedChild);
+ $this->assign('selectedChild', $selectedChild);
+ }
+ }
+
/**
* Set variables up before form is built.
*/
*/
public function preProcess() {
parent::preProcess();
- $this->assign('selectedChild', 'settings');
+ $this->setSelectedChild('settings');
$entityID = $this->_id ?: $this->_templateId;
if ($entityID) {
*/
public function preProcess() {
parent::preProcess();
- $this->assign('selectedChild', 'fee');
+ $this->setSelectedChild('fee');
}
/**
*/
public function preProcess() {
parent::preProcess();
- $this->assign('selectedChild', 'location');
+ $this->setSelectedChild('location');
$this->_values = $this->get('values');
if ($this->_id && empty($this->_values)) {
$this->_profileBottomNumAdd = CRM_Utils_Array::value('addProfileNumAdd', $_GET, 0);
parent::preProcess();
- $this->assign('selectedChild', 'registration');
+ $this->setSelectedChild('registration');
$this->assign('addProfileBottom', $this->_addProfileBottom);
$this->assign('profileBottomNum', $this->_profileBottomNum);
public function preProcess() {
parent::preProcess();
- $this->assign('selectedChild', 'repeat');
+ $this->setSelectedChild('repeat');
$this->assign('currentEventId', $this->_id);
$checkParentExistsForThisId = CRM_Core_BAO_RecurringEntity::getParentFor($this->_id, 'civicrm_event');
*/
public function preProcess() {
parent::preProcess();
- $this->assign('selectedChild', 'reminder');
+ $this->setSelectedChild('reminder');
$setTab = CRM_Utils_Request::retrieve('setTab', 'Int', $this, FALSE, 0);
$mapping = CRM_Utils_Array::first(CRM_Core_BAO_ActionSchedule::getMappings([
* @throws \CRM_Core_Exception
*/
public static function build(&$form) {
- $form->assign('selectedChild', CRM_Utils_Request::retrieve('selectedChild', 'Alphanumeric', $form));
-
$tabs = $form->get('tabHeader');
if (!$tabs || empty($_GET['reset'])) {
$tabs = self::process($form);
public function preProcess() {
parent::preProcess();
- $this->assign('selectedChild', 'friend');
+ $this->setSelectedChild('friend');
}
/**
public function preProcess() {
parent::preProcess();
- $this->assign('selectedChild', 'pcp');
+ $this->setSelectedChild('pcp');
}
/**