Issue #2661504 by yogeshmpawar, tim.plunkett, quietone, smustgrave: Document return values of Views render pipeline correctly

merge-requests/3490/head
catch 2023-02-17 08:48:40 +00:00
parent 49ffcb8d33
commit efd53eb0cd
2 changed files with 10 additions and 2 deletions

View File

@ -63,8 +63,10 @@ abstract class DisplayPluginBase extends PluginBase implements DisplayPluginInte
/**
* Stores the rendered output of the display.
*
* @see View::render
* @var string
* @var array|null
* Render output array, or NULL if no output.
*
* @see \Drupal\views\ViewExecutable::render()
*/
public $output = NULL;

View File

@ -391,6 +391,9 @@ interface DisplayPluginInterface {
/**
* Renders this display.
*
* @return array
* A render array.
*/
public function render();
@ -495,6 +498,9 @@ interface DisplayPluginInterface {
* Renders the display for the purposes of a live preview.
*
* Also might be used for some other AJAXy reason.
*
* @return array
* The render array of live preview.
*/
public function preview();