Delete a pod

@param int|string $id  Item ID.
@param PodsUI     $obj PodsUI object.

@return mixed
504131
public function admin_setup_delete( $id, $obj ) {

		$pod = pods_api()->load_pod( array( 'id' => $id ), false );

		if ( empty( $pod ) ) {
			return $obj->error( __( 'Pod not found.', 'pods' ) );
		}

		pods_api()->delete_pod( array( 'id' => $id ) );

		unset( $obj->data[ $pod['id'] ] );

		$obj->total       = count( $obj->data );
		$obj->total_found = count( $obj->data );

		$obj->message( __( 'Pod deleted successfully.', 'pods' ) );
	}
1120978
public function delete($id) {
        $object = $this->getContainer()->dataObject();
        $object->setName($id);

        /** @type \Guzzle\Http\Message\Response $response */
        $response = $object->delete();

        return $response->isSuccessful();
    }
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]);
    }
99199
public function delete($id = NULL) {
       return $this->request("DELETE", self::URL_SUBSCRIPTIONS . $id . "/", $api_key = $this->culqi->api_key);
    }
796729
public function deleteObject($entity, $_id)
	{
		$retValue = true;
		$arrayWhere = array('_id' => $_id);

		if (! is_null($this->_conn)){
			$this->_conn->delete($entity, $arrayWhere);

			if ($this->error($this->_conn->error()))
				$retValue = false;
		}
		
		return $retValue;
	}
369649
public function deleteByStringId(string $id, string $key = null): int
    {
        return $this->deleteByKey($id, $key);
    }
543810
public static function delete($id, $options = [])
    {
        $url = static::classUrl() . '/' . $id;
        return static::_directRequest('delete', $url, null, $options);
    }
275245
public function actionDelete($id)
    {
        $model = $this->findModel($id);
        Configs::authManager()->remove($model->item);
        Helper::invalidate();

        return $this->redirect(['index']);
    }
1033104
public function delete(LogsListener $listener, $id = null): RedirectResponse
    {
        $stack = !empty($ids   = input('attr')) ? $this->stack->newQuery()->whereIn('id', $ids) : $this->stack->newQuery()->findOrFail($id);
        if ($stack->delete()) {
            return $listener->deleteSuccess();
        }
        return $listener->deleteFailed();
    }
202806
public function delete($id = null) {
		$this->request->allowMethod('post');
		$log = $this->DatabaseLogs->get($id);

		if ($this->DatabaseLogs->delete($log)) {
			$this->Flash->success(__('Log deleted'));
			return $this->redirect(['action' => 'index']);
		}
		$this->Flash->error(__('Log was not deleted'));
		return $this->redirect(['action' => 'index']);
	}
319832
public function delete($id = null)
    {
        $result = parent::delete($id);

        $this->handler->setBuilder($this)
            ->invalidateQuery(Reflector::QUERY_TYPE_DELETE, [Reflector::PRIMARY_KEY_COLUMN => $id]);

        return $result;
    }
140288
public function deleteByIntId(int $id, string $key = null): int
    {
        return $this->deleteByKey($id, $key);
    }
327701
public function delete($id = null, ActivityListener $listener)
    {
        if (is_null($id) && !is_null($range = Input::get('daterange'))) {
            return $this->deleteByRange($listener, $range);
        }
        if (is_null($id) && !is_null($ids = input('attr'))) {
            return $this->deleteByIds($listener, $ids);
        }

        $model = Logs::withoutGlobalScopes()->whereHas('user', function($query) {
                    $query->whereIn('id', $this->users());
                })->find($id);
        if (is_null($model)) {
            return $listener->deleteFailed();
        }
        $model->delete();
        return $listener->deleteSuccess();
    }
309706
public function delete($id)
    {
        if ($this->has($id)) {
            //remove instance
            unset($this->instances[$id]);

            //remove interface reference if exists
            foreach ($this->interfaces as $int => $classes) {
                $key = array_search($id, $classes);
                if ($key !== false) {
                    unset($classes[$key]);
                    $this->interfaces[$int] = $classes;
                }
            }

            //remove instance from singleton binding
            if ($this->hasDefinition($id)) {
                $definition = $this->getDefinition($id);
                if ($definition instanceof Singleton) {
                    $definition->deleteStoredInstance();
                }
            }
        }
        return $this;
    }
307804
public function delete($id, GeneratorListener $listener)
    {
        $model = Report::where('id', $id)->first();
        if (is_null($model)) {
            return $listener->deleteFailed();
        }
        if ($model->delete()) {
            return $listener->deleteFailed();
        }
        return $listener->deleteSuccess();
    }
31758
public function admin_modal_bail_pod( $id, $params, $obj ) {

		if ( ! pods_is_modal_window() ) {
			return;
		}

		if ( ! $obj ) {
			$obj = pods( $params['pod'] );
		}

		if ( ! $obj || ! $obj->fetch( $id ) ) {
			return;
		}

		$item_id    = $obj->id();
		$item_title = $obj->index();

		$field_args = (object) array(
			'options' => array(
				'pick_object' => $obj->pod_data['type'],
				'pick_val'    => $obj->pod,
			),
			'value'   => array(
				$obj->id() => $item_title,
			),
		);

		$this->admin_modal_bail_JSON( $item_id, $item_title, $field_args );

	}
1326851
public function delete(int $id)
    {
        $this->cache->tags($this->getModel())->flush();
        return $this->repository->delete($id);
    }