blacksmith-8.x-1.x-dev/src/Blacksmith/EntityImporter/FieldFormatter/FloatFieldFormatter.php

src/Blacksmith/EntityImporter/FieldFormatter/FloatFieldFormatter.php
<?php

namespace Drupal\blacksmith\Blacksmith\EntityImporter\FieldFormatter;

/**
 * Class FloatFieldFormatter.
 *
 * @package Drupal\blacksmith\Blacksmith\EntityImporter\FieldFormatter
 */
class FloatFieldFormatter extends NumberFieldFormatter {

  /**
   * {@inheritdoc}
   */
  protected function validateUniqueValue($value) : bool {
    if (!parent::validateUniqueValue($value)) {
      return FALSE;
    }

    return is_float($value);
  }

}

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

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