Deletes an item or a list of items.

@param \stdClass $params Associative list of parameters
15670
public function deleteItems( \stdClass $params )
	{
		$this->checkParams( $params, array( 'items' ) );

		foreach( (array) $params->items as $id ) {
			$this->getManager()->deleteItem( $id );
		}

		return array(
			'success' => true,
		);
	}
181260
public function insertItems( \stdClass $params )
	{
		$this->checkParams( $params, array( 'items' ) );

		$manager = $this->getManager();

		$refId = ( isset( $params->refid ) ? $params->refid : null );
		$parentId = ( ( isset( $params->parentid ) && $params->parentid !== 'root' ) ? $params->parentid : null );
		$items = ( !is_array( $params->items ) ? array( $params->items ) : $params->items );

		foreach( $items as $entry )
		{
			$item = $manager->createItem();
			$item->fromArray( (array) $this->transformValues( $entry ) );
			$manager->insertItem( $item, $parentId, $refId );

			$entry->{'locale.site.id'} = $item->getId();
		}

		return array(
			'items' => ( !is_array( $params->items ) ? reset( $items ) : $items ),
			'success' => true,
		);
	}
767209
public function saveItems( stdClass $params )
	{
		$this->_checkParams( $params, array( 'site', 'items' ) );
		$this->_setLocale( $params->site );

		$ids = array();
		$items = ( !is_array( $params->items ) ? array( $params->items ) : $params->items );

		foreach( $items as $entry )
		{
			$item = $this->_createItem( (array) $entry );
			$this->_manager->saveItem( $item );
			$ids[] = $item->getId();
		}

		$this->_clearCache( $ids );

		$search = $this->_manager->createSearch();
		$search->setConditions( $search->compare( '==', 'price.id', $ids ) );
		$search->setSlice( 0, count( $ids ) );
		$items = $this->_toArray( $this->_manager->searchItems( $search ) );

		return array(
			'items' => ( !is_array( $params->items ) ? reset( $items ) : $items ),
			'success' => true,
		);
	}
194409
public function saveItems( \stdClass $params )
	{
		$this->checkParams( $params, array( 'site', 'items' ) );

		$ids = [];
		$manager = $this->getManager();
		$items = ( !is_array( $params->items ) ? array( $params->items ) : $params->items );

		foreach( $items as $entry )
		{
			$langid = ( isset( $entry->{'order.base.languageid'} ) ? $entry->{'order.base.languageid'} : null );
			$currencyid = ( isset( $entry->{'order.base.currencyid'} ) ? $entry->{'order.base.currencyid'} : null );

			$this->setLocale( $params->site, $langid, $currencyid );

			$item = $manager->createItem();
			$item->fromArray( (array) $this->transformValues( $entry ) );
			$item = $manager->saveItem( $item );
			$ids[] = $item->getId();
		}

		return $this->getItems( $ids, $this->getPrefix() );
	}
1320429
public function delete($query, array $params = [])
    {
        $stmt = $this->connection->prepare($query);
        $stmt->execute($params);
        return $stmt->rowCount();
    }
901062
public function remove($param)
    {
        if ( ! $this->isOpened()) {
            $this->start();
        }
        if (isset($this->attributes[$param])) {
            unset($this->attributes[$param]);
        }
        return $this;
    }
988166
public function insertItems( stdClass $params )
	{
		$this->_checkParams( $params, array( 'items' ) );

		$manager = $this->_getManager();

		$refId = ( isset( $params->refid ) ? $params->refid : null );
		$parentId = ( ( isset( $params->parentid ) && $params->parentid !== 'root' ) ? $params->parentid : null );
		$items = ( !is_array( $params->items ) ? array( $params->items ) : $params->items );

		foreach( $items as $entry )
		{
			$item = $this->_createItem( (array) $entry );
			$manager->insertItem( $item, $parentId, $refId );

			$entry->{'locale.site.id'} = $item->getId();
		}

		return array(
			'items' => ( !is_array( $params->items ) ? reset( $items ) : $items ),
			'success' => true,
		);
	}
454685
public function moveItems( stdClass $params )
	{
		$this->_checkParams( $params, array( 'items', 'oldparentid', 'newparentid', 'refid' ) );

		$manager = $this->_getManager();

		if( $params->newparentid === 'root' ) {
			$params->newparentid = null;
		}

		$refId = ( isset( $params->refid ) ? $params->refid : null );
		$items = ( !is_array( $params->items ) ? array( $params->items ) : $params->items );

		foreach( $items as $entry ) {
			$manager->moveItem( $entry, $params->oldparentid, $params->newparentid, $refId );
		}

		return array(
			'success' => true,
		);
	}
1357004
public function remove(array $params)
    {
        $key = array_get($params, 'key');
        $field = array_get($params, 'field');

        return $this->getConnection()->hdel($key, [$field]);
    }
1216429
public function delete($params, $optParams = [])
    {
        if ($params instanceof SuperBackup) {
            $params = $params->id;
        }
        if(!isset($optParams['cloud'])){
            $optParams['cloud'] = [];
        }
        $optParams['cloud']['id'] = $params;
        return $this->sendRequest([], [
            'restAction' => 'delete',
            'uri' => '/c/<cloud.id>',
            'restId' => $params,
            'getParams' => $optParams,
        ], function ($response) {
            return $response->success;
        });
    }
1026253
public function deleteAllAccessTokens(array $param = [])
    {
        $count = 0;

        foreach ($this->getAllStoredAccessTokenFiles() as $file) {
            unlink($file);
            $count++;
        }

        return $count;
    }
1303583
public function delete($url, array $params = [])
    {
        return $this->request($this->createUrl($url), self::METHOD_DELETE, $params);
    }
1217471
public function searchItems( \stdClass $params )
	{
		$this->checkParams( $params, array( 'site' ) );
		$this->setLocale( $params->site );

		$totalList = 0;
		$search = $this->initCriteria( $this->getManager()->createSearch(), $params );
		$result = $this->getManager()->searchItems( $search, [], $totalList );

		$idLists = [];
		$listItems = [];

		foreach( $result as $item )
		{
			if( ( $domain = $item->getDomain() ) != '' ) {
				$idLists[$domain][] = $item->getRefId();
			}
			$listItems[] = (object) $item->toArray( true );
		}

		return array(
			'items' => $listItems,
			'total' => $totalList,
			'graph' => $this->getDomainItems( $idLists ),
			'success' => true,
		);
	}
1122987
protected function _normalizeParams(array &$params)
    {
        ksort($params, \SORT_STRING);
        array_walk($params, function (&$value) {
            if (is_numeric($value)) {
                $value = (string)$value;
            }
        });

        if (isset($params['?'])) {
            $this->_normalizeParams($params['?']);
        }
    }
1085257
public function searchItems( stdClass $params )
	{
		$this->_checkParams( $params, array( 'site' ) );
		$this->_setLocale( $params->site );

		$total = 0;
		$search = $this->_initCriteria( $this->_getManager()->createSearch(), $params );
		$items = $this->_getManager()->searchItems( $search, array(), $total );

		return array(
			'items' => $this->_toArray( $items ),
			'total' => $total,
			'success' => true,
		);
	}
520862
public function setParams($params): void
    {
        if (! \is_array($params) && ! $params instanceof \ArrayAccess) {
            throw new \InvalidArgumentException('Event params are invalid. Expected type is array or \\ArrayAccess. Got ' . \gettype($params));
        }

        $this->params = $params;
    }
818398
public function deleteItems( stdClass $params )
	{
		$this->_checkParams( $params, array( 'site', 'items' ) );
		$this->_setLocale( $params->site );

		foreach( (array) $params->items as $id ) {
			$this->_getManager()->deleteItem( $id );
		}

		$this->_clearCache( (array) $params->items );

		return array(
			'items' => $params->items,
			'success' => true,
		);
	}