gridstack-8.x-2.5/src/Plugin/Layout/GridStackFoundation.php

src/Plugin/Layout/GridStackFoundation.php
<?php

namespace Drupal\gridstack\Plugin\Layout;

/**
 * Provides Foundation integration.
 */
class GridStackFoundation {

  /**
   * The classes.
   *
   * @var array
   */
  private static $classes;

  /**
   * Returns the supported classes.
   *
   * @return array
   *   An associative array of grouped classes.
   */
  public static function classes() {
    if (!isset(static::$classes)) {
      $text = $text_align = $text_transform = [];
      $utility = ['clearfix', 'radius', 'rounded', 'shadow'];
      $visibility = [
        'hide',
        'visible',
        'show-for-medium',
        'show-for-large',
        'show-for-small-only',
        'show-for-medium-only',
        'show-for-large-only',
        'hide-for-medium',
        'hide-for-large',
        'hide-for-small-only',
        'hide-for-medium-only',
        'hide-for-large-only',
      ];

      foreach (['hide', 'nowrap', 'truncate', 'wrap'] as $key) {
        $text[] = 'text-' . $key;
      }
      foreach (['left', 'right', 'center', 'justify'] as $key) {
        $text_align[] = 'text-' . $key;
      }
      foreach (['lowercase', 'uppercase', 'capitalize'] as $key) {
        $text_transform[] = 'text-' . $key;
      }

      // Classes, keyed by group.
      static::$classes = [
        'text' => $text,
        'text_align' => $text_align,
        'text_transform' => $text_transform,
        'utility' => $utility,
        'visibility' => $visibility,
      ];
    }

    return static::$classes;
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc