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

Breadcrumb

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

function ContentTranslationMetadataWrapper::setCreatedTime

Overrides ContentTranslationMetadataWrapperInterface::setCreatedTime

File

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

Class

ContentTranslationMetadataWrapper
Base class for content translation metadata wrappers.

Namespace

Drupal\content_translation

Code

public function setCreatedTime($timestamp) {
    $field_name = $this->translation
        ->hasField('content_translation_created') ? 'content_translation_created' : 'created';
    $this->setFieldOnlyIfTranslatable($field_name, $timestamp);
    return $this;
}

API Navigation

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