protected property GlobalFunctionSniff::$functions in Coder 8.2
Same name and namespace in other branches
- 8.3 coder_sniffer/DrupalPractice/Sniffs/Objects/GlobalFunctionSniff.php \DrupalPractice\Sniffs\Objects\GlobalFunctionSniff::functions
- 8.3.x coder_sniffer/DrupalPractice/Sniffs/Objects/GlobalFunctionSniff.php \DrupalPractice\Sniffs\Objects\GlobalFunctionSniff::functions
List of global functions that should not be called.
Type: string[]
File
- coder_sniffer/
DrupalPractice/ Sniffs/ Objects/ GlobalFunctionSniff.php, line 32
Class
- GlobalFunctionSniff
- Checks that global functions like t() are not used in forms or controllers.
Namespace
DrupalPractice\Sniffs\ObjectsCode
protected $functions = array(
'drupal_get_destination' => 'the "redirect.destination" service',
'drupal_render' => 'the "renderer" service',
'entity_load' => 'the "entity_type.manager" service',
'file_load' => 'the "entity_type.manager" service',
'format_date' => 'the "date.formatter" service',
'node_load' => 'the "entity_type.manager" service',
'node_load_multiple' => 'the "entity_type.manager" service',
'node_type_load' => 'the "entity_type.manager" service',
't' => '$this->t()',
'taxonomy_term_load' => 'the "entity_type.manager" service',
'taxonomy_vocabulary_load' => 'the "entity_type.manager" service',
'user_load' => 'the "entity_type.manager" service',
'user_role_load' => 'the "entity_type.manager" service',
);