You are here

class Spacing in Bootstrap Styles 1.0.x

Class Spacing.

@package Drupal\bootstrap_styles\Plugin\StylesGroup

Plugin annotation


@StylesGroup(
  id = "spacing",
  title = @Translation("Spacing"),
  weight = 3,
  icon = "bootstrap_styles/images/plugins/spacing-icon.svg"
)

Hierarchy

Expanded class hierarchy of Spacing

1 string reference to 'Spacing'
Spacing::buildConfigurationForm in src/Plugin/BootstrapStyles/StylesGroup/Spacing.php

File

src/Plugin/BootstrapStyles/StylesGroup/Spacing.php, line 21

Namespace

Drupal\bootstrap_styles\Plugin\BootstrapStyles\StylesGroup
View source
class Spacing extends StylesGroupPluginBase {
  use ResponsiveTrait;

  /**
   * {@inheritdoc}
   */
  public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
    $form['spacing'] = [
      '#type' => 'details',
      '#title' => $this
        ->t('Spacing'),
      '#open' => FALSE,
    ];
    return $form;
  }

  /**
   * {@inheritdoc}
   */
  public function buildStyleFormElements(array &$form, FormStateInterface $form_state, $storage) {
    $this
      ->buildBreakpointsFields($form, 'spacing');
    $form['spacing_preview'] = [
      '#theme' => 'spacing_preview',
    ];
    return $form;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HelperTrait::getSvgIconMarkup public function Generates the svg markup from path.
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 2
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
ResponsiveTrait::buildBreakpoints protected function Add the breakpoints classes to the build classes.
ResponsiveTrait::buildBreakpointsConfigurationForm protected function TODO: Remove and replace this function.
ResponsiveTrait::buildBreakpointsFields protected function Build the breakpoints style form elements.
ResponsiveTrait::buildBreakpointsStyleFormElements protected function TODO: RENAME Build the breakpoints style form elements.
ResponsiveTrait::buildResponsivePreviewer protected function Build the responsive previewer form elements.
ResponsiveTrait::createBreakpointFormField protected function Build the breakpoints configuration form.
ResponsiveTrait::createBreakpointsStyleFormClassIndexBasedFields protected function Create breakpoints fields for class index based field like padding.
ResponsiveTrait::createBreakpointsStyleFormFields protected function Create breakpoints fields for a given field.
ResponsiveTrait::createBreakpointStyleFormClassIndexBasedField protected function Create breakpoint field for class index based field like padding.
ResponsiveTrait::createBreakpointStyleFormField protected function Create breakpoint field for a given field.
ResponsiveTrait::getBreakpoints protected function The available breakpoint.
ResponsiveTrait::getBreakpointsKeys protected function The available breakpoint.
ResponsiveTrait::getBreakpointTitle protected function Get breakpoint title by key.
ResponsiveTrait::saveBreakpointsStyleFormClassIndexBasedFields protected function Save the breakpoints fields values to the storage.
ResponsiveTrait::saveBreakpointsStyleFormFields protected function Save the breakpoints fields values to the storage.
ResponsiveTrait::submitBreakpointsConfigurationForm protected function Save the breakpoints fields values to the configuration.
Spacing::buildConfigurationForm public function Overrides StylesGroupPluginBase::buildConfigurationForm
Spacing::buildStyleFormElements public function Overrides StylesGroupPluginBase::buildStyleFormElements
StringTranslationTrait::$stringTranslation protected property The string translation service. 4
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
StylesGroupPluginBase::$configFactory protected property The config factory.
StylesGroupPluginBase::build public function
StylesGroupPluginBase::config public function
StylesGroupPluginBase::CONFIG constant Config settings.
StylesGroupPluginBase::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create
StylesGroupPluginBase::getIconPath public function
StylesGroupPluginBase::getTitle public function Return the title of the Styles Group form plugin. Overrides StylesGroupPluginInterface::getTitle
StylesGroupPluginBase::getTitleWithIcon public function
StylesGroupPluginBase::submitConfigurationForm public function
StylesGroupPluginBase::submitStyleFormElements public function 1
StylesGroupPluginBase::validateConfigurationForm public function
StylesGroupPluginBase::__construct public function Constructs a StylePluginBase object. Overrides PluginBase::__construct