RowPluginBase::render() update docblock.

Created on 18 March 2019, about 6 years ago
Updated 9 April 2025, 9 days ago

Problem/Motivation

This:

   * @return string
   *   The rendered output of a single row, used by the style plugin.

Disagrees with this:

  public function render($row) {
    return [

See also πŸ“Œ Return render arrays from RowPluginBase::render overrides Closed: outdated

Also it would be very helpful to know what kind of object:

   * @param object $row
   *   A single row of the query result, so an element of $view->result.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 3 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States mile23 Seattle, WA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands Lendude Amsterdam

    In certain parts of Views this already gets type hinted as a ResultRow, see \Drupal\views\Entity\Render\EntityTranslationRendererBase::renderByRelationship which gets called from \Drupal\views\Plugin\views\row\EntityRow::render so being more strict here sounds good.

    No idea if the deprecation message is the way we want to move towards stricter typing? Makes sense to me, but not sure if there are other examples of this already in core.
    Also, if we use the deprecation message here we should add a type in D11 to the parameter, is a deprecation like this enough to get that done or do we need a follow up for that? The message should include a link to a change notice always right?

  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States richgerdes New Jersey, USA

    I tested this locally. Everything works as expected.

    Converted the patch into a merge request and updated the depreciation message since we're no longer adding changes to 10.x branches.

  • Pipeline finished with Failed
    9 days ago
    Total: 207s
    #469451
  • πŸ‡ΊπŸ‡ΈUnited States richgerdes New Jersey, USA

    I also created a second followup branch which includes an additional commit to set the type hint. I don't think there is a branch for merging into Drupal 12 yet, so not sure what the next steps would be. I would expect that it would need to be broken out into its own issue and postponed until D12 is in development probably.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Pipeline appears to have issues but the goal is to now do a deprecation summary + title need to reflect that.

Production build 0.71.5 2024