Remove all choices (results) and selections after step $stepId.

@param int $stepId

@return void
172375
protected final function refreshSelectionsAfter(int $stepId)
    {
        for ($i = $stepId+1; $i < count($this->selections); $i++) {
            $selectionId = $this->selections[$i]->getName();
            unset($this->selections[$i]);
            unset($this->results[$selectionId]);
        }
        $this->updateSelections();
        $this->updateResults();
    }
334041
protected function edit_step($id) {
        global $PAGE;

        if (isset($id)) {
            $step = step::instance($id);
        } else {
            $step = new step();
            $step->set_tourid(required_param('tourid', PARAM_INT));
        }

        $tour = $step->get_tour();

        if (!empty($tour->get_config(self::CONFIG_SHIPPED_TOUR))) {
            notification::add(get_string('modifyshippedtourwarning', 'tool_usertours'), notification::WARNING);
        }

        $PAGE->navbar->add($tour->get_name(), $tour->get_view_link());
        if (isset($id)) {
            $PAGE->navbar->add($step->get_title(), $step->get_edit_link());
        } else {
            $PAGE->navbar->add(get_string('newstep', 'tool_usertours'), $step->get_edit_link());
        }

        $form = new forms\editstep($step->get_edit_link(), $step);
        if ($form->is_cancelled()) {
            redirect($step->get_tour()->get_view_link());
        } else if ($data = $form->get_data()) {
            $step->handle_form_submission($form, $data);
            $step->get_tour()->reset_step_sortorder();
            redirect($step->get_tour()->get_view_link());
        } else {
            if (empty($id)) {
                $this->header(get_string('newstep', 'tool_usertours'));
            } else {
                $this->header(get_string('editstep', 'tool_usertours', $step->get_title()));
            }
            $form->set_data($step->prepare_data_for_form());

            $form->display();
            $this->footer();
        }
    }
1174388
public function down(Table $table, $id, $step = 1)
    {
        return $this->_move($table, $id, $step, self::TYPE_DOWN);
    }
1328967
protected function DeleteNotExecutedOrder($sUniqId)
    {
        $oNotExecutedOrder = TdbShopOrder::GetNewInstance();
        if ($oNotExecutedOrder->LoadFromField('order_ident', $sUniqId)) {
            $oNotExecutedOrder->AllowEditByAll(true);
            $oNotExecutedOrder->Delete();
            $oNotExecutedOrder->AllowEditByAll(false);
            unset($_SESSION[TShopBasket::SESSION_KEY_PROCESSING_BASKET]);
        }
    }
751754
protected function move_step($id) {
        require_sesskey();

        $direction = required_param('direction', PARAM_INT);

        $step = step::instance($id);
        $currentsortorder   = $step->get_sortorder();
        $targetsortorder    = $currentsortorder + $direction;

        $tour = $step->get_tour();
        $swapwith = helper::get_step_from_sortorder($tour->get_id(), $targetsortorder);

        // Set the sort order to something out of the way.
        $step->set_sortorder(-1);
        $step->persist();

        // Swap the two sort orders.
        $swapwith->set_sortorder($currentsortorder);
        $swapwith->persist();

        $step->set_sortorder($targetsortorder);
        $step->persist();

        // Reset the sort order.
        $tour->reset_step_sortorder();
        redirect($tour->get_view_link());
    }
1206088
public function remove($parentId, $id)
    {
        $resource = $this->createPartialResourceUrlForView($parentId, $id);
        $this->client->delete($resource);
    }
1181999
public function remove($taskId) {
		if ($this->TaskClient->remove($taskId)) {
			$this->Session->setFlash("Task $taskId deleted", 'alert/simple', array(
				'class' => 'alert-success', 'title' => 'Ok!'
			));
		} else {
			$this->Session->setFlash("Can't delete task $taskId!", 'alert/simple', array(
				'class' => 'alert-error', 'title' => 'Error!'
			));
		}
		$this->redirect($this->referer());
	}
845158
public function replace($stepNameToReplace, Step $replacingStep)
    {
        $this->assertStepExists($stepNameToReplace);

        // remove event bindings for step being replaced
        $stepToReplace = $this->steps[$stepNameToReplace];
        foreach ($stepToReplace->getTriggeringEvents() as $eventName) {
            unset($this->eventBindings[$eventName]);
        }

        // insert after the step we want to replace
        $this->insert($stepNameToReplace, $replacingStep, true);

        // remove step
        unset($this->steps[$stepNameToReplace]);

        // reindex steps array
        $temporaryStepNames = array_keys($this->steps);
        $temporarySteps = array_values($this->steps);

        $this->steps = array_combine($temporaryStepNames, $temporarySteps);
    }
1008595
public function removeByID($itemID)
    {
        parent::removeByID($itemID);

        if ($this->getJoinTable() == 'Group_Members') {
            $currentMember = Security::getCurrentUser();
            if (!($currentMember && $currentMember->exists())) {
                return;
            }

            $member = Member::get()->byId($itemID);
            $group = Group::get()->byId($this->getForeignID());

            if (!$group) {
                return;
            }
            if (!$member) {
                return;
            }

            $this->getAuditLogger()->info(sprintf(
                '"%s" (ID: %s) removed Member "%s" (ID: %s) from Group "%s" (ID: %s)',
                $currentMember->Email ?: $currentMember->Title,
                $currentMember->ID,
                $member->Email ?: $member->Title,
                $member->ID,
                $group->Title,
                $group->ID
            ));
        }
    }
942994
public function unhold($channelId)
    {
        $uri = "channels/$channelId/hold";
        try {
            $this->client->getEndpoint()->delete($uri);
        } catch (RequestException $e) {
            $this->processRequestException($e);
        }
    }
1268925
public function deleteTask($taskId)
    {
        if ($taskId instanceof Tasks) {
            $taskId = $taskId->id;
        }

        $this->service->tasks->delete($this->tasklist, $taskId);
    }
241216
public void removeDeleted(String entryId) {

        CmsListItem item = getDeleted().getItem(entryId);
        if (item != null) {
            // remove
            getDeleted().removeItem(item);
        }
        if (getDeleted().getWidgetCount() == 0) {
            m_clipboardButton.enableClearDeleted(false);
        }
    }
377457
public function destroy($sessionId)
    {
        parent::destroy($sessionId);
        if (isset($_COOKIE[$this->cookieKeyName])) {
            setcookie($this->cookieKeyName, '', 1);
            unset($_COOKIE[$this->cookieKeyName]);
        }
        return true;
    }
57927
function (component) {
    var callbacks = this.callbacks;
    if (component.beforeStep) {
      callbacks.beforeStep.splice(callbacks.beforeStep.indexOf(component), 1);
    }
    if (component.step) {
      callbacks.step.splice(callbacks.step.indexOf(component), 1);
    }
    if (component.afterStep) {
      callbacks.afterStep.splice(callbacks.afterStep.indexOf(component), 1);
    }
  }
984792
protected function print_edit_step_link($tourid, $stepid = null) {
        $addlink = helper::get_edit_step_link($tourid, $stepid);
        $attributes = [];
        if (empty($stepid)) {
            $attributes['class'] = 'createstep';
        }
        echo \html_writer::link($addlink, get_string('newstep', 'tool_usertours'), $attributes);
    }
1251748
public function removeStep(string $stepIdentifier)
    {
        $removedOccurrences = 0;
        foreach ($this->steps as $previousStepIdentifier => $steps) {
            foreach ($steps as $step) {
                if ($step->getIdentifier() === $stepIdentifier) {
                    unset($this->steps[$previousStepIdentifier][$stepIdentifier]);
                    $removedOccurrences++;
                }
            }
        }
        if ($removedOccurrences === 0) {
            throw new FlowException(sprintf('Cannot remove sequence step with identifier "%s" because no such step exists in the given sequence.', $stepIdentifier), 1322591669);
        }
    }
902754
public function removeStep(\Coramer\Sigtec\WebBundle\Entity\Core\IntroStep $steps)
    {
        $this->steps->removeElement($steps);
    }