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

Breadcrumb

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

GlobalFunctionSniff::$traitFunctions

List of global functions that are covered by traits.

This is a subset of the global functions list. These functions can be replaced by methods that are provided by the listed trait.

Type: string[]

File

vendor/drupal/coder/coder_sniffer/DrupalPractice/Sniffs/Objects/GlobalFunctionSniff.php, line 55

Class

GlobalFunctionSniff
Checks that global functions like t() are not used in forms or controllers.

Namespace

DrupalPractice\Sniffs\Objects

Code

protected $traitFunctions = [
    't' => '\\Drupal\\Core\\StringTranslation\\StringTranslationTrait',
];

API Navigation

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