Removes FeaturedTutorialSkills from Video

@param mixed $id
@param mixed $data
@return PayloadInterface
6886
public function removeFeaturedTutorialSkills($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Video not found.']);
		}

		// pass remove to internal logic
		try {
			$this->doRemoveFeaturedTutorialSkills($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(VideoEvent::PRE_FEATURED_TUTORIAL_SKILLS_REMOVE, $model, $data);
		$this->dispatch(VideoEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(VideoEvent::POST_FEATURED_TUTORIAL_SKILLS_REMOVE, $model, $data);
		$this->dispatch(VideoEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
328471
public function destroy(Request $request, $id)
    {
        $recipient = Recipient::findOrFail($id);
        $recipient->delete();

        return redirect(route('eyewitness.settings.index').'#recipients')->withSuccess('The recipient has been deleted. They will not receive any further notifications from Eyewitness.');
    }
248387
public function removeCoupons(string $id, array $data, array $headers = [])
    {
        $url = $this->url('subscriptions/%s/remove_coupons', $id);

        return $this->post($url, $data, $headers);
    }
1058505
public function deleteAction($id)
    {
        /** @var ContentManager $manager */
        $manager = $this->get('opifer.content.content_manager');
        $content = $manager->getRepository()->find($id);

        //generate new slug so deleted slug can be used again
        $hashedSlug = $content->getSlug().'-'.sha1(date('Y-m-d H:i:s'));

        $content->setSlug($hashedSlug);
        $manager->save($content);

        $manager->remove($content);

        return new JsonResponse(['success' => true]);
    }
462081
public function destroy($id)
    {
     	$package = Package::findOrfail($id);
     	$package->delete();
        return URL::to('package');
    }
251959
public function createAtkVue($id, $component, $data = [])
    {
        return $this->service->createAtkVue($id, $component, $data);
    }
689037
public function deleteAction($id)
    {
        $request = $this->getRequest();
        $returnToMedia = $request->get('returnToMedia');
        $id = $request->get($this->admin->getIdParameter());
        $object = $this->admin->getObject($id);

        if (!$object) {
            throw new NotFoundHttpException(sprintf('unable to find the object with id : %s', $id));
        }

        if (false === $this->admin->isGranted('DELETE', $object)) {
            throw new AccessDeniedException();
        }

        if ($this->getRestMethod() == 'DELETE') {
            // check the csrf token
            $this->validateCsrfToken('sonata.delete');
            $translator = $this->get('translator');
            try {
                $this->admin->delete($object);

                if ($this->isXmlHttpRequest()) {
                    return $this->renderJson(['result' => 'ok']);
                }

                $this->addFlash(
                    'sonata_flash_success',
                    $translator->trans(
                        'flash_delete_success',
                        ['%name%' => $this->escapeHtml($this->admin->toString($object))],
                        'SonataAdminBundle'
                    )
                );

                if ($returnToMedia) {
                    $mediaAdmin = $this->get('sonata.media.admin.media');
                    $url = $mediaAdmin->generateUrl('list');

                    return new RedirectResponse($url);
                }
            } catch (ModelManagerException $e) {
                $this->logModelManagerException($e);

                if ($this->isXmlHttpRequest()) {
                    return $this->renderJson(['result' => 'error']);
                }

                $this->addFlash(
                    'sonata_flash_error',
                    $translator->trans(
                        'flash_delete_error',
                        ['%name%' => $this->escapeHtml($this->admin->toString($object))],
                        'SonataAdminBundle'
                    )
                );
            }

            return $this->redirectTo($object);
        }

        return $this->render('@NetworkingInitCms/TagAdmin/delete.html.twig', [
            'object' => $object,
            'action' => 'delete',
            'returnToMedia' => $returnToMedia,
            'csrf_token' => $this->getCsrfToken('sonata.delete'),
        ]);
    }
312458
protected function doUpdateFeaturedTutorialSkills(Video $model, $data) {
		// remove all relationships before
		SkillQuery::create()->filterByFeaturedTutorial($model)->delete();

		// add them
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Skill';
			} else {
				$related = SkillQuery::create()->findOneById($entry['id']);
				$model->addFeaturedTutorialSkill($related);
			}
		}

		if (count($errors) > 0) {
			throw new ErrorsException($errors);
		}
	}
951270
public function removeVariations($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// pass remove to internal logic
		try {
			$this->doRemoveVariations($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SkillEvent::PRE_VARIATIONS_REMOVE, $model, $data);
		$this->dispatch(SkillEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SkillEvent::POST_VARIATIONS_REMOVE, $model, $data);
		$this->dispatch(SkillEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
443880
public function removePictures($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// pass remove to internal logic
		try {
			$this->doRemovePictures($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SkillEvent::PRE_PICTURES_REMOVE, $model, $data);
		$this->dispatch(SkillEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SkillEvent::POST_PICTURES_REMOVE, $model, $data);
		$this->dispatch(SkillEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
961787
public function cancelImmediately($id)
    {
        $service = $this->getService();
        $rawData = !empty($this->_params)
            ? $this->getRawData(array('subscription' => $this->_params))
            : null;

        $response = $service->request('subscriptions/' . (int)$id, 'DELETE', $rawData);
        $responseArray = $this->getResponseArray($response);

        if (!$this->isError()) {
            $this->_data = $responseArray['subscription'];
        } else {
            $this->_data = array();
        }

        return $this;
    }
834461
public static function removeByID( $id )
    {
        $db = eZDB::instance();
        $db->begin();
        $db->query( "DELETE FROM ezcobj_state_link WHERE contentobject_state_id=$id" );
        eZPersistentObject::removeObject( eZContentObjectStateLanguage::definition(), array( 'contentobject_state_id' => $id ) );
        eZPersistentObject::removeObject( eZContentObjectState::definition(), array( 'id' => $id ) );
        $db->commit();
    }
904556
public function deleteAction($id)
    {
        $subscriptionManager = $this->get('phlexible_message.subscription_manager');

        $subscription = $subscriptionManager->find($id);
        $subscriptionManager->deleteSubscription($subscription);

        return new ResultResponse(true, 'Subscription deleted.');
    }
996458
public function removeObjects($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Sport not found.']);
		}

		// pass remove to internal logic
		try {
			$this->doRemoveObjects($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SportEvent::PRE_OBJECTS_REMOVE, $model, $data);
		$this->dispatch(SportEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SportEvent::POST_OBJECTS_REMOVE, $model, $data);
		$this->dispatch(SportEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
1370031
public function removeParents($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// pass remove to internal logic
		try {
			$this->doRemoveParents($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SkillEvent::PRE_CHILDREN_REMOVE, $model, $data);
		$this->dispatch(SkillEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SkillEvent::POST_CHILDREN_REMOVE, $model, $data);
		$this->dispatch(SkillEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
1339351
public function saveById($id, $data)
    {
        $subData = array();
        foreach (array_keys($this->subAttributeList) as $subKey) {
            $subData[$subKey] = null;
            if (isset($data[$subKey])) {
                $subData[$subKey] = $data[$subKey];
                unset($data[$subKey]);
            }
        }
        $id = parent::saveById($id, $data);
        foreach (array_keys($this->subAttributeList) as $subKey) {
            $this->saveSubAttributeById($id, $subKey, $subData[$subKey]);
        }
        return $id;
    }
1171525
public function cancel(string $id, array $data, array $headers = [])
    {
        $url = $this->url('subscriptions/%s/cancel', $id);

        return $this->post($url, $data, $headers);
    }