[DELETE] /configured-extra-form-types/{name}.

Delete an extra form type.

@Delete("/configured-extra-form-types/{name}")

@return Response
345464
public function deleteConfiguredExtraFormTypesAction(ParamFetcher $paramFetcher, $name)
    {
        $em = $this->getDoctrine()->getManager();
        $configuredType = $em
            ->getRepository('IDCIExtraFormBundle:ConfiguredType')
            ->findOneByName($name)
        ;

        if (null === $configuredType) {
            return new Response('No configured type found with name ' . $name, Response::HTTP_NOT_FOUND);
        }

        $em->remove($configuredType);
        $em->flush();

        return new Response(null, Response::HTTP_NO_CONTENT);
    }
829469
public function delete()
    {
        $app = Application::getFacadeApplication();
        $db = $app->make(Connection::class);
        $db->delete('BlockTypeSetBlockTypes', ['btsID' => $this->getBlockTypeSetID()]);
        $db->delete('BlockTypeSets', ['btsID' => $this->getBlockTypeSetID()]);
    }
755154
public static function get_deleted_types() {
        $defaults = self::get_default_types();
        $deleted = array();
        foreach (self::get_custom_types() as $customentry) {
            if (!empty($customentry->deleted)) {
                $deleted[$customentry->extension] = $defaults[$customentry->extension];
            }
        }
        return $deleted;
    }
1357456
def delete(type, name)
      resource_class = parse_type(type)
      client_setup
      matches = resource_class.find_by(@client, name: name)
      fail_nice('Not Found', 2) if matches.empty?
      resource = matches.first
      return unless options['force'] || agree("Delete '#{name}'? [Y/N] ")
      begin
        resource.delete
        puts 'Deleted Successfully!'
      rescue StandardError => e
        fail_nice "Failed to delete #{resource.class.name.split('::').last} '#{name}': #{e}"
      end
    end
478688
public function delete()
    {
        if (!$this->isXmlHttpRequest()) {
            throw new common_exception_BadRequest('wrong request mode');
        }
        $deliveryExecutionUri = tao_helpers_Uri::decode($this->getRequestParameter('uri'));
        $de = $this->getServiceProxy()->getDeliveryExecution($deliveryExecutionUri);

        try {
            $this->getResultStorage($de->getDelivery());

            $deleted = $this->getResultsService()->deleteResult($deliveryExecutionUri);

            $this->returnJson(array('deleted' => $deleted));
        } catch (\common_exception_Error $e) {
            $this->returnJson(array('error' => $e->getMessage()));
        }
    }
685856
public function delete()
	{
		if ( !isset($this->attributes[$this->primary_column]))
			throw new XeroGeneralException(sprintf("The %s attribute is required.", $this->primary_column));

		$this->setAttribute($this->status_field, 'DELETED');

		$response = $this->api->request('POST', $this->getUrl(), array(), $this->toXML(), $this->format);
		return $this->parseResponse($response) ? true : false;
	}
870553
protected function deleteExtension()
    {
        $extensionEntity = $this->getExtensionEntity();

        $this->executeAction(ExtensionManager::DELETE, array('id' => $extensionEntity->get('id')));
    }
916737
public function delete()
    {     
        Util::delTree( $this->getPath() );
        foreach (Server::enum() as $s) {
            $tname = str_replace( THEME_DIR.'/', '', $s->templateDir );
            if ($tname == $this->name) {
                $s->setTheme();
            }
        }
    }
454106
public function deletePlatformIdAction(){
        $translator = $this->getServiceLocator()->get('translator');
        $this->getEventManager()->trigger('meliscms_platform_IDs_delete_start', $this, array());
        $request = $this->getRequest();
        $datas = get_object_vars($request->getPost());
        
        $pids_id = (int) $datas['pid_id'];
        $melisEngineTablePlatformIds = $this->getServiceLocator()->get('MelisEngineTablePlatformIds');
        $melisEngineTablePlatformIds->deleteById($pids_id);
        
        $response = array(
            'success' => 1,
            'textTitle' => 'tr_meliscms_tool_platform_ids',
            'textMessage' => 'tr_meliscms_tool_platform_ids_delete_success_msg',
        );
        $this->getEventManager()->trigger('meliscms_platform_IDs_delete_end', $this, array_merge($response, array('typeCode' => 'CMS_PLATFORM_IDS_DELETE', 'itemId' => $pids_id)));
        return new JsonModel($response);
    }
442552
public function deleteAction(Request $request)
    {
        try {
            $manager = $this->get('ongr_settings.settings_manager');
            $manager->delete($request->get('name'));

            return new JsonResponse(['error' => false]);
        } catch (\Exception $e) {
            return new JsonResponse(
                [
                    'error' => true,
                    'message' => 'Error occurred please try to delete setting again.'
                ]
            );
        }
    }
326436
public function deleteContentTypes(
        ContentTypesDeleteData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(ContentTypesDeleteType::class);

        return $this->formFactory->createNamed($name, ContentTypesDeleteType::class, $data);
    }
359783
public function getExtraFormConstraints()
    {
        if (null === $this->extraFormType) {
            return null;
        }

        $configurationArray = json_decode($this->configuration, true);

        return $configurationArray['extra_form_constraints'];
    }
1202421
public function delete()
	{
		$view = $this->getView();
		$context = $this->getContext();

		$manager = \Aimeos\MShop::create( $context, 'catalog/lists' );

		$search = $manager->createSearch();
		$expr = array(
			$search->compare( '==', 'catalog.lists.refid', $view->param( 'id' ) ),
			$search->compare( '==', 'catalog.lists.domain', 'product' )
		);
		$search->setConditions( $search->combine( '&&', $expr ) );
		$search->setSlice( 0, 0x7fffffff );

		$start = 0;

		do
		{
			$search->setSlice( $start );

			$result = $manager->searchItems( $search );
			$manager->deleteItems( array_keys( $result ) );

			$count = count( $result );
			$start += $count;
		}
		while( $count >= $search->getSliceSize() );
	}
992437
public function deleteAction(Request $request, $id)
    {
        /** @var Config $data */
        $data = $this->manager->find($id);

        // It should always be possible to delete a connector even if the adaptor itself does
        // not exist anymore. So unlike the new and edit actions this action will not throw a
        // not found exception when the adaptor does not exist.

        if (!$data) {
            return $this->redirect($this->generateUrl('integrated_channel_config_index')); // data is already gone
        }

        $event = new GetResponseConfigEvent($data, $request);

        if ($this->dispatcher->dispatch(IntegratedChannelEvents::CONFIG_DELETE_REQUEST, $event)->getResponse()) {
            return $event->getResponse();
        }

        $form = $this->createDeleteForm($data);
        $form->handleRequest($request);

        if ($form->get('actions')->getData() == 'cancel') {
            return $this->redirect($this->generateUrl('integrated_channel_config_index'));
        }

        if ($form->isSubmitted() && $form->isValid()) {
            $this->manager->remove($data);

            if ($message = $this->getFlashMessage()) {
                $message->success(sprintf('The config %s is removed', $data->getName()));
            }

            $response = $this->redirect($this->generateUrl('integrated_channel_config_index'));

            $this->dispatcher->dispatch(
                IntegratedChannelEvents::CONFIG_DELETE_RESPONSE,
                new FilterResponseConfigEvent($data, $request, $response)
            );

            return $response;
        }

        return $this->render('IntegratedChannelBundle:Config:delete.html.twig', [
            'adapter' => $this->registry->hasAdapter($data->getAdapter()) ? $this->registry->getAdapter($data->getAdapter()) : null,
            'data'    => $data,
            'form'    => $form->createView()
        ]);
    }
583627
public function unregister()
    {
        if ($this->prepare_hook)
        {
            Hook::unsubscribe('Wedeto.HTTP.Forms.Form.prepare', $this->prepare_hook);
            $this->prepare_hook = null;
        }

        if ($this->validate_hook)
        {
            Hook::unsubscribe('Wedeto.HTTP.Forms.Form.isValid', $this->validate_hook);
            $this->validate_hook = null;
        }
    }
1238832
public function deletePlatformAction()
    {
        $response = array();
        $this->getEventManager()->trigger('meliscore_platform_delete_start', $this, $response);
        $translator = $this->getServiceLocator()->get('translator');
        $platformTable = $this->getServiceLocator()->get('MelisCoreTablePlatform');
        $melisTool = $this->getServiceLocator()->get('MelisCoreTool');
        $melisTool->setMelisToolKey(self::TOOL_INDEX, self::TOOL_KEY);
        
        $textTitle = 'tr_meliscore_tool_platform_title';
        $textMessage = 'tr_meliscore_tool_platform_prompts_delete_failed';
        
        $id = 0;
        $success = 0;
        $platform = '';
        
        if($this->getRequest()->isPost())
        {
            $id = (int) $this->getRequest()->getPost('id');
            if(is_numeric($id))
            {
                $domainData = $platformTable->getEntryById($id);
                $domainData = $domainData->current();
                if(!empty($domainData)) 
                {
                    $platform = $domainData->plf_name;
                    $platformTable->deleteById($id);
                    $textMessage = 'tr_meliscore_tool_platform_prompts_delete_success';
                    $success = 1;
                }
            }
        }
        
        $response = array(
            'textTitle' => $textTitle,
            'textMessage' => $textMessage,
            'success' => $success
        );
        
        $eventData = array_merge($response, array(
            'platform' => $platform,
            'id' => $id,
            'typeCode' => 'CORE_PLATFORM_DELETE',
            'itemId' => $id
        ));
        
        $this->getEventManager()->trigger('meliscore_platform_delete_end', $this, $eventData);
        
        return new JsonModel($response);
    }
670975
public static function delete_type($extension) {
        // Extension must exist.
        $mimetypes = get_mimetypes_array();
        if (!array_key_exists($extension, $mimetypes)) {
            throw new coding_exception('Extension ' . $extension . ' not found');
        }

        // Get existing custom filetype list.
        $customs = self::get_custom_types();

        // Remove any entries for this extension.
        foreach ($customs as $key => $custom) {
            if ($custom->extension === $extension && empty($custom->deleted)) {
                unset($customs[$key]);
            }
        }

        // If it was a standard entry (doesn't have 'custom' set) then add a
        // deleted marker.
        if (empty($mimetypes[$extension]['custom'])) {
            $customs[] = (object)array('extension' => $extension, 'deleted' => true);
        }

        // Save and reset cache.
        self::set_custom_types($customs);
    }