You are here

public function StylePluginBase::getStyleOptionsCount in Bootstrap Styles 1.0.x

Helper function to get the options of given style name.

Parameters

string $name: A config style name like background_color.

Return value

array Array of key => value of style name options.

2 calls to StylePluginBase::getStyleOptionsCount()
Border::buildStyleFormElements in src/Plugin/BootstrapStyles/Style/Border.php
Margin::buildStyleFormElements in src/Plugin/BootstrapStyles/Style/Margin.php

File

src/Style/StylePluginBase.php, line 178

Class

StylePluginBase
A base class to help developers implement their own Styles Group plugins.

Namespace

Drupal\bootstrap_styles\Style

Code

public function getStyleOptionsCount(string $name) {

  // -1 to drop the _none option from the count.
  $count = count($this
    ->getStyleOptions($name)) - 1;
  return $count;
}