function VariantCollectionTrait::getVariant

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

See also

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

File

src/Plugin/VariantCollectionTrait.php, line 29

Class

VariantCollectionTrait
Provides methods for VariantCollectionInterface.

Namespace

Drupal\ctools\Plugin

Code

public function getVariant($variant_id) {
    return $this->getVariants()
        ->get($variant_id);
}