public function ViewsEntityRow::getDerivativeDefinition

Returns the definition of a derivative plugin.

Parameters

string $derivative_id: The derivative id. The id must uniquely identify the derivative within a given base plugin, but derivative ids can be reused across base plugins.

array $base_plugin_definition: The definition array of the base plugin from which the derivative plugin is derived.

Return value

array The full definition array of the derivative plugin, typically a merge of $base_plugin_definition with extra derivative-specific information. NULL if the derivative doesn't exist.

Overrides DerivativeInterface::getDerivativeDefinition

File

drupal/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsEntityRow.php, line 32
Contains \Drupal\views\Plugin\Derivative\ViewsEntityRow.

Class

ViewsEntityRow
Provides views row plugin definitions for all non-special entity types.

Namespace

Drupal\views\Plugin\Derivative

Code

public function getDerivativeDefinition($derivative_id, array $base_plugin_definition) {
  if (!empty($this->derivatives) && !empty($this->derivatives[$derivative_id])) {
    return $this->derivatives[$derivative_id];
  }
  $this
    ->getDerivativeDefinitions($base_plugin_definition);
  return $this->derivatives[$derivative_id];
}