You are here

class StyleService in Opigno training catalog 8

Same name and namespace in other branches
  1. 3.x src/StyleService.php \Drupal\opigno_catalog\StyleService

Class StyleService.

Hierarchy

Expanded class hierarchy of StyleService

1 string reference to 'StyleService'
opigno_catalog.services.yml in ./opigno_catalog.services.yml
opigno_catalog.services.yml
1 service uses StyleService
opigno_catalog.get_style in ./opigno_catalog.services.yml
Drupal\opigno_catalog\StyleService

File

src/StyleService.php, line 8

Namespace

Drupal\opigno_catalog
View source
class StyleService {

  /**
   * Constructs a new StyleService object.
   */
  public function __construct() {
  }

  /**
   * Returns style.
   */
  public function getStyle() {
    $tempstore = \Drupal::service('user.private_tempstore')
      ->get('opigno_catalog');
    return $tempstore
      ->get('style');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
StyleService::getStyle public function Returns style.
StyleService::__construct public function Constructs a new StyleService object.