src/Component/Frontend/VariableRemoveModal/VariableRemoveModal.php
public function handleRemove(int $id) : void
    {
        if ($this->presenter->isAjax() && $this->presenter->user->isAllowed(StructureAuthorizator::RES_VARIABLE_REMOVE_MODAL))
        {
            $this->variableEntity = $this->variableRepository->findOneById($id);

            $this->variableManager->delete($this->variableEntity);

            $this->presenter->notificationAjax(
                'Proměnná odstraněna.',
                "Proměnná '{$this->variableEntity->getLabel()} byla úspěšně odstraněna.'",
                'success',
                FALSE
            );

            $this->presenter->handleModalToggle('hide', '#wakers_structure_variable_remove_modal', FALSE);

            $this->onRemove();
        }
    }
public function handleRemove(int $id) : void
    {
        if ($this->presenter->isAjax() && $this->presenter->user->isAllowed(StructureAuthorizator::RES_VARIABLE_REMOVE_MODAL))
        {
            $this->variableEntity = $this->variableRepository->findOneById($id);

            $this->variableManager->delete($this->variableEntity);

            $this->presenter->notificationAjax(
                'Proměnná odstraněna.',
                "Proměnná '{$this->variableEntity->getLabel()} byla úspěšně odstraněna.'",
                'success',
                FALSE
            );

            $this->presenter->handleModalToggle('hide', '#wakers_structure_variable_remove_modal', FALSE);

            $this->onRemove();
        }
    }
Handler pro odstranění
@param int $id
@throws \Exception