<?php

namespace Drupal\edlp_fils\Controller;

use Drupal\Core\Controller\ControllerBase;
// use Drupal\Core\Datetime\DrupalDateTime;
use Symfony\Component\HttpFoundation\JsonResponse;


class FilsController extends ControllerBase {

  /**
   * Display productions as a page.
   *
   * @return renderable array
   */
  public function fils() {
    return array(
      "#markup"=>"Edlp Fils"
    );
  }

  /**
   * Get agenda data as json through ajax.
   *
   * @return json
   */
  public function filsjson() {

    $response = new JsonResponse();
    $renderable = array(
      "#markup"=>"Edlp Fils"
    );
    $rendered = render($renderable);

    $response->setData([
      'test'=>'hello',
      'rendered'=> $rendered
    ]);

    return $response;
  }

}
