Toggle table field.

@param array $ids
@param int $value
@return int
2265
protected function _toggleField(array $ids, $value = STATUS_UN_PUBLISH)
    {
        return $this->_table->updateAll([
            $this->_configRead('field') => $value,
        ], [
            $this->_table->getPrimaryKey() . ' IN (' . implode(',', $ids) . ')'
        ]);
    }
670096
public function findMany($ids, $columns = ['*'])
    {
        return empty($ids) ? [] : $this->whereIn(
            $this->getRelated()->getQualifiedKeyName(), $ids
        )->get($columns);
    }
1146441
public function removeMany(array $ids) {
		$event  = $this->getProfiler()->startDelete('Remove (' . count($ids) . '): ' . implode(', ', $ids));
		$result = $this->getBackend()->removeMany($ids);
		
		if ($result === false) {
			$event->stopError();
		} else {
			$event->stopSuccess();
		}
		
		return $result;
	}
545402
public function setImportedByIds($ids)
    {
        try {
            $coreResource = $this->getConnection();
            $tableName = $this->getTable(Schema::EMAIL_CATALOG_TABLE);

            $coreResource->update(
                $tableName,
                [
                    'modified' => new \Zend_Db_Expr('null'),
                    'imported' => '1',
                    'updated_at' => gmdate('Y-m-d H:i:s'),
                ],
                ["product_id IN (?)" => $ids]
            );
        } catch (\Exception $e) {
            $this->helper->debug((string)$e, []);
        }
    }
700048
public function deleteMany(array $ids)
    {
        $primaryKey = isset($this->primaryKey) ? $this->primaryKey : 'id';

        if (method_exists($this, 'beforeDelete')) {
            $this->beforeDelete();
        }

        $this->qb->whereIn($primaryKey, $ids);

        if ($this->qb->table($this->table)->delete()) {
            if (method_exists($this, 'afterDelete')) {
                return $this->afterDelete();
            }

            return $this->db->getAffectedRows();
        }

        return false;
    }
75547
public function setIds(array $ids)
    {
        $actualIds = [];

        foreach ($ids as $id) {
            $this->assertValidId($id);
            $actualIds[] = $id;
        }

        $this->clearCachedValueIf($this->ids != $actualIds);
        $this->ids = $actualIds;
    }
494587
public static function findByIds($className, array $ids, array $options): ResultInterface
    {
        list($tableName, , $columnId) = self::getTable($className);
        $instance = self::getInstance($className);

        $query  = Query::table($tableName)->className($className)->whereIn($columnId, $ids)->selectInstance($instance);
        $query  = self::applyOptions($query, $options);
        $fields = self::getFieldsFromOptions($options);

        return $query->get($fields);
    }
1359858
public function withCustomFieldById(int $id, $value): ConversationFilters
    {
        $filters = clone $this;
        if ($this->customFieldIds === null) {
            $this->customFieldIds = [];
        }
        $filters->customFieldIds[] = "$id:$value";

        return $filters;
    }
1227378
public function offsetSet($id, $value)
    {
        $slot = $this->slots[$id] ?? null;
        if ($slot && $slot->isLocked()){
            throw new SlotIsLockedException($id, $value);
        }
        if (is_callable($value) || method_exists($value,'__invoke')){
            $this->factories[$id] = $value;
            unset($this->instances[$id]);
        }
        else{
            // replace instance
            $this->replaceInstance($id, $slot, $value);
        }
        $this->registered[$id] = true;
    }
1015900
public function delete(array $ids)
    {
        if (!count($ids)) {
            return;
        }
        $ids_str = implode(',', $ids);
        $db = Db::obtain();
        $slots = $db->fetchArrayPDO(
            'SELECT id FROM ' . Db::realTablename('slots') . ' WHERE match_id IN (' . $ids_str . ')',
            array()
        );
        $slotsFormatted = array();
        foreach ($slots as $slot) {
            array_push($slotsFormatted, $slot['id']);
        }
        if (count($slotsFormatted)) {
            $slots_str = implode(',', $slotsFormatted);
            $db->exec('DELETE FROM ' . Db::realTablename('ability_upgrades') . ' WHERE slot_id IN (' . $slots_str . ')');
            $db->exec('DELETE FROM ' . Db::realTablename('additional_units') . ' WHERE slot_id IN (' . $slots_str . ')');
            $db->exec('DELETE FROM ' . Db::realTablename('slots') . ' WHERE id IN (' . $slots_str . ')');
        }
        $db->exec('DELETE FROM ' . Db::realTablename('picks_bans') . ' WHERE match_id IN (' . $ids_str . ')');
        $db->exec('DELETE FROM ' . Db::realTablename('matches') . ' WHERE match_id IN (' . $ids_str . ')');
    }
1220743
public function deleteContent(array $ids): void
	{
		if ($this->isAjax() && $this->editConst) {
			$pages = $this->orm->content->findById($ids);
			foreach ($pages as $page) {
				$this->orm->content->remove($page);
			}
			$this->orm->flush();
			$this['list']->reload();
		} else {
			$this->terminate();
		}
	}
1353044
public static function activate_subscriptions(array $ids) {
        global $DB;
        if (!empty($ids)) {
            list($sql, $params) = $DB->get_in_or_equal($ids);
            $success = $DB->set_field_select('tool_monitor_subscriptions', 'inactivedate', '0', 'id ' . $sql, $params);
            return $success;
        }
        return false;
    }
333342
public function bind_if( $id, $value = null, $singleton = false ) {
		if ( ! $this->bound( $id ) ) {
			$this->bind( $id, $value, $singleton );
		}
	}
873682
public function set($id, $value) : Slot
    {
        $this->offsetSet($id, $value);
        return $this->slot($id);
    }
1254431
public function autoExport(array $ids)
    {
        $this->exportPosts = array_replace($this->exportPosts, $ids);
        $this->exportPosts = array_unique($this->exportPosts);
    }
683903
public function getValues(array $ids)
    {
        $values = [];
        foreach ($ids as $id => $default) {
            if (is_int($id)) {
                $id = $default;
            }
            $values[$id] = $this->getValue($id, $default);
        }

        return $values;
    }
552660
public function share(string $id, Closure $value, array $tags = []): void
    {
        $value = function ($container) use ($value) {
            static $sharedValue;

            if ($sharedValue === null) {
                $sharedValue = $value($container);
            }

            return $sharedValue;
        };
        $this->set($id, $value, $tags);
    }