Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
Currently, We have reference for object inside a class has combination of full path or just class name.
For example:
/**
* Translates element's value if it fits our translation criteria.
*
* For an element to be translatable by locale module it needs to be of base
* type 'string' and have 'translatable = TRUE' in the element's definition.
* Translatable elements may use these additional keys in their data
* definition:
* - 'translatable', FALSE to opt out of translation.
* - 'locale context', to define the string context.
*
* @param \Drupal\Core\TypedData\TypedDataInterface $element
* Configuration element.
* @param array $options
* Array with translation options that must contain the following keys:
* - 'source', Source language code.
* - 'target', Target language code.
*
* @return bool
* Whether the element fits the translation criteria.
*/
protected function translateElement(\Drupal\Core\TypedData\TypedDataInterface $element, array $options) {
Here both @param and method arg needs fix.
Proposed resolution
Discuss. IMO, it should be just class name. It is the standard in Symfony would as well
Remaining tasks
- Agree on an approach
- Update coding standard document.
- Find the list of files that need fix
- Start cleaning up
User interface changes
N/A
API changes
N/A
Original report by @vijaycs85
#1987768-17: Convert node_page_view() to a new style controller
Comments
Comment #1
dawehnerAs written on IRC, this is just about the comment, see #1323082: Establish standards for namespace usage [no patch] for pretty much the same discussion.
Comment #1.0
dawehnerUpdated issue summary.