You are here

InfoCardController.php in Opigno group manager 3.x

Same filename and directory in other branches
  1. 8 src/Controller/InfoCardController.php

File

src/Controller/InfoCardController.php
View source
<?php

namespace Drupal\opigno_group_manager\Controller;

use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;

/**
 * Class InfoCardController.
 */
class InfoCardController extends ControllerBase {

  /**
   * Hides info card.
   */
  public function hideInfoCard() {
    $tempstore = \Drupal::service('tempstore.private')
      ->get('opigno_group_manager');
    $tempstore
      ->set('hide_info_card', TRUE);
    return new JsonResponse(NULL, Response::HTTP_OK);
  }

}

Classes

Namesort descending Description
InfoCardController Class InfoCardController.