Remove a given option

@param OptionInterface $option
@return $this
501015
public function removeOption(OptionInterface $option)
    {
        if ($this->hasOption($option)) {
            $this->options->removeElement($option);
        }

        return $this;
    }
668166
public function removeImage(\Elcodi\Component\Media\Entity\Interfaces\ImageInterface $image)
    {
        $this->images->removeElement($image);

        return $this;
    }
1194166
public function removeItem(ItemInterface $item)
    {
        foreach ($this->feedItems as $i => $feedItem) {
            if ($feedItem == $item) {
                unset($this->feedItems[$i]);
            }
        }
        $this->feedItems = array_values($this->feedItems);
        return $this;
    }
926713
public function removeOption($option)
    {
        if ($this->hasOption($option)) {
            $key = array_search($option, $this->options);
            unset($this->options[$key]);
        }
    }
646296
public function removeAttributeValue(AttributeValueInterface $attributeValue)
    {
        if ($this->attributeValues->contains($attributeValue)) {
            $attributeValue->setSubject(null);
            $this->attributeValues->removeElement($attributeValue);
        }

        return $this;
    }
296038
public function removeOperation(OperationInterface $operation)
    {
        if ($this->operations->contains($operation)) {
            $this->operations->removeElement($operation);
        }

        return $this;
    }
844078
public function removeVariant(VariantInterface $variant)
    {
        if ($this->hasVariant($variant)) {
            $variant->setObject(null);
            $this->variants->removeElement($variant);
        }

        return $this;
    }
1107562
public function delete(RecordInterface $record): self
    {
        $this->loadData(true);
        $this->assertValid($record);

        foreach ($this->instances as $index => $instance) {
            if ($this->match($instance, $record)) {
                //Remove from save
                unset($this->instances[$index]);
                $this->deleteInstances[] = $instance;
                break;
            }
        }

        $this->instances = array_values($this->instances);

        return $this;
    }
810636
protected function setOption(int $option): self
    {
        $this->setOptions($this->getOptions() | $option);

        return $this;
    }
260223
public function remove(ModelInterface $model): RepositoryInterface
    {
        $id = $model->getId();
        $table = $this->getTable();

        if (null === $this->find($id)) {
            return $this;
        }

        $this->connection->beginTransaction();

        $row = $model->toPersistence();

        foreach ($row as $field => $value) {
            if ($value instanceof ModelCollectionInterface) {
                $this->removeRelatedModels($value->getInitialModels());
            } elseif ($value instanceof ModelReferenceInterface) {
                if (null !== $initialModel = $value->getInitialModel()) {
                    $this->removeRelatedModel($initialModel);
                }
            }
        }

        $this->logger->info(
            'model: remove row from table {table} with id {id}',
            ['table' => $table, 'id' => $id]
        );

        $this->connection->delete($table, ['id' => $id]);

        $this->storageCache->remove($id);

        $this->connection->commit();

        return $this;
    }
1095684
public function unregister(ResponderInterface $responder)
    {
        $key = array_search($responder, $this->queue, true);
        if ($key !== false) {
            unset($this->queue[$key]);
        }

        return $this;
    }
1210137
public function setOptions(OptionsInterface $options = null)
    {
        if (null !== $options && !$options instanceof Options) {
            $options = new Options($options->toArray());
        }

        $this->options = $options;
        return $this;
    }
469917
public function remove(Model\EnvironmentInterface $environment)
    {
        $this->pmProxyClient->delete('/environments/' . $environment->getNormalizedName());
        if ($environment->hasChildren()) {
            foreach ($environment->getChildren() as $child) {
                /** @var Model\EnvironmentInterface $child */
                $this->remove($child);
            }
        }
        return $this;
    }
336996
public function removeFilterOption($name)
    {
        $this->filterOptions->remove($this->filterOptions->find('name', $name));
        return $this;
    }
1204346
public function unsetOption($option)
    {
        if (!isset(static::$availableOptions[$option])) {
            throw new \InvalidArgumentException(sprintf(
                'Invalid option specified: "%s". Expected one of (%s)',
                $option,
                implode(', ', array_keys(static::$availableOptions))
            ));
        }
        $pos = array_search(static::$availableOptions[$option], $this->options, true);
        if (false !== $pos) {
            unset($this->options[$pos]);
        }
    }
1339708
public function delete(FileInterface $file)
    {

        if(isset($this->fs[$file->getPath()])){
            unset($this->fs[$file->getPath()]);
        }
        if($dir = $file->getDir()){
            $dir->removeChild($file);
        }
        return $this;

    }
877291
public function remove($identifier): Option
    {
        foreach ($this->queue as $key => $item) {
            if ($item->getMessage()->getIdentifier() === $identifier) {
                unset($this->queue[$key]);

                return Option::fromValue($item);
            }
        }

        return None::create();
    }