function VariantCollectionTrait::removeVariant

Same name in other branches
  1. 4.0.x src/Plugin/VariantCollectionTrait.php \Drupal\ctools\Plugin\VariantCollectionTrait::removeVariant()

See also

\Drupal\ctools\Plugin\VariantCollectionInterface::removeVariant()

File

src/Plugin/VariantCollectionTrait.php, line 36

Class

VariantCollectionTrait
Provides methods for VariantCollectionInterface.

Namespace

Drupal\ctools\Plugin

Code

public function removeVariant($variant_id) {
    $this->getVariants()
        ->removeInstanceId($variant_id);
    return $this;
}