function VariantCollectionTrait::getVariants
Same name in other branches
- 4.0.x src/Plugin/VariantCollectionTrait.php \Drupal\ctools\Plugin\VariantCollectionTrait::getVariants()
See also
\Drupal\ctools\Plugin\VariantCollectionInterface::getVariants()
File
-
src/
Plugin/ VariantCollectionTrait.php, line 44
Class
- VariantCollectionTrait
- Provides methods for VariantCollectionInterface.
Namespace
Drupal\ctools\PluginCode
public function getVariants() {
if (!$this->variantCollection) {
$this->variantCollection = new VariantPluginCollection(\Drupal::service('plugin.manager.display_variant'), $this->getVariantConfig());
$this->variantCollection
->sort();
}
return $this->variantCollection;
}