function _acquia_lift_personalize_campaign_wizard_next_element in Acquia Lift Connector 7.2
Retrieve the next nested element's name.
Useful for when the element name is a dynamic counter and locatable based on its nesting within the parent structure.
Parameters
array $form_state: The current form state to retrieve parents
string $previous: The previous element name.
array $parents: An option array of parents. If not provided, the triggering_element's parents will be used.
Return value
string The next nested element's name.
21 calls to _acquia_lift_personalize_campaign_wizard_next_element()
- acquia_lift_personalize_campaign_wizard_blocks_add in ./
acquia_lift.admin.wizard.inc - Submit handler to add another block option to a personalized block form.
- acquia_lift_personalize_campaign_wizard_blocks_ajax in ./
acquia_lift.admin.wizard.inc - Callback to for AJAX to generate the personalize block wrapper form.
- acquia_lift_personalize_campaign_wizard_blocks_remove in ./
acquia_lift.admin.wizard.inc - Submit handler to remove a block option from a personalized block form.
- acquia_lift_personalize_campaign_wizard_goals_ajax_cancel in ./
acquia_lift.admin.wizard.inc - Ajax submit handler to cancel the creation of a specific goal.
- acquia_lift_personalize_campaign_wizard_goals_ajax_change in ./
acquia_lift.admin.wizard.inc - Ajax submit handler to change the type of goal being created.
File
- ./
acquia_lift.admin.wizard.inc, line 2498 - acquia_lift.admin.wizard.inc Functions specific to the Acquia Lift alteration of the campaign creation wizard.
Code
function _acquia_lift_personalize_campaign_wizard_next_element($form_state, $previous, $parents = NULL) {
if (!is_array($parents)) {
if (!isset($form_state['triggering_element'])) {
return '';
}
$parents = $form_state['triggering_element']['#array_parents'];
}
if (($delta_pos = array_search($previous, $parents, TRUE)) === FALSE) {
return '';
}
$delta_pos++;
if (count($parents) < $delta_pos) {
return '';
}
return $parents[$delta_pos];
}