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

  1. Agree on an approach
  2. Update coding standard document.
  3. Find the list of files that need fix
  4. 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

dawehner’s picture

Status: Active » Closed (duplicate)

As written on IRC, this is just about the comment, see #1323082: Establish standards for namespace usage [no patch] for pretty much the same discussion.

dawehner’s picture

Issue summary: View changes

Updated issue summary.