public function content() {
    $config = $this->config('openy.terms_and_conditions.schema');
    $timestamp = $config->get('accepted_version');
    $content = $this->t('Terms and Conditions were not accepted');

    // Is accepted.
    if ($timestamp) {
      $date = $this->dateFormatter
        ->format($timestamp, 'custom', 'F d, Y', 'UTC');
      $time = $this->dateFormatter
        ->format($timestamp, 'custom', 'H:i:s', 'UTC');
      $content = $this->t(
        'Terms and Conditions were accepted on @date at @time time UTC',
        [
          '@date' => $date,
          '@time' => $time,
        ]
      );
    }

    return new Response($content, 200, ['Content-Type' => 'text/plain']);
  }
public function content() {
    $config = $this->config('openy.terms_and_conditions.schema');
    $timestamp = $config->get('accepted_version');
    $content = $this->t('Terms and Conditions were not accepted');

    // Is accepted.
    if ($timestamp) {
      $date = $this->dateFormatter
        ->format($timestamp, 'custom', 'F d, Y', 'UTC');
      $time = $this->dateFormatter
        ->format($timestamp, 'custom', 'H:i:s', 'UTC');
      $content = $this->t(
        'Terms and Conditions were accepted on @date at @time time UTC',
        [
          '@date' => $date,
          '@time' => $time,
        ]
      );
    }

    return new Response($content, 200, ['Content-Type' => 'text/plain']);
  }
public function content ( ) { $ config = $ this -> config ( 'openy.terms_and_conditions.schema' ) ; $ timestamp = $ config -> get ( 'accepted_version' ) ; $ content = $ this -> t ( 'Terms and Conditions were not accepted' ) ; // Is accepted. if ( $ timestamp ) { $ date = $ this -> dateFormatter -> format ( $ timestamp , 'custom' , 'F d, Y' , 'UTC' ) ; $ time = $ this -> dateFormatter -> format ( $ timestamp , 'custom' , 'H:i:s' , 'UTC' ) ; $ content = $ this -> t ( 'Terms and Conditions were accepted on @date at @time time UTC' , [ '@date' => $ date , '@time' => $ time , ] ) ; } return new Response ( $ content , 200 , [ 'Content-Type' => 'text/plain' ] ) ; }
Provides the terms.txt file.

@return \Symfony\Component\HttpFoundation\Response
The terms.txt file as a response object with 'text/plain' content type.
Provides the terms . txt file .