Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ContentTranslationMetadataWrapper.php

function ContentTranslationMetadataWrapper::getCreatedTime

Overrides ContentTranslationMetadataWrapperInterface::getCreatedTime

File

core/modules/content_translation/src/ContentTranslationMetadataWrapper.php, line 106

Class

ContentTranslationMetadataWrapper
Base class for content translation metadata wrappers.

Namespace

Drupal\content_translation

Code

public function getCreatedTime() {
    $field_name = $this->translation
        ->hasField('content_translation_created') ? 'content_translation_created' : 'created';
    return $this->translation
        ->get($field_name)->value;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal