Results

31.10.2019
replication 8.x-1.x-dev :: tests/src/Kernel/Normalizer/NormalizerTestBase.php
   *   The formatted RFC3339 date string or UNIX timestamp.
   *
   * @see \Drupal\serialization\Normalizer\TimestampItemNormalizer
   */
  protected function formatExpectedTimestampItemValues($timestamp) {
    // Get the minor version only from the \Drupal::VERSION string.
    $minor_version = substr(\Drupal::VERSION, 0, 3);

    // If the setting is enabled, just return the timestamp as-is now.
    // Otherwise, format the date string to the same that
    // \Drupal\serialization\Normalizer\TimestampItemNormalizer will produce.
    $date = new \DateTime();
    $date->setTimestamp($timestamp);
    $date->setTimezone(new \DateTimeZone('UTC'));

    // Format is also added to the expected return values.
    return [
11.05.2020
content_sync 8.x-2.x-dev :: src/Normalizer/TimestampItemNormalizer.php
use Drupal\Core\TypedData\Plugin\DataType\Timestamp;

use Drupal\serialization\Normalizer\TimestampItemNormalizer as BaseTimestampItemNormalizer;

/**
 * Converts values for TimestampItem to and from common formats.
 *
 * Overrides FieldItemNormalizer and
 * \Drupal\serialization\Normalizer\TimestampNormalizer
19.10.2020
smart_date 3.1.0-beta1 :: src/Normalizer/SmartDateItemNormalizer.php
namespace Drupal\smart_date\Normalizer;

use Drupal\serialization\Normalizer\TimestampItemNormalizer;
use Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem;
use Drupal\smart_date\TypedData\Plugin\DataType\SmartDate;

/**
 * Converts values for TimestampItem to and from common formats.
 *

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

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