function ManageResolverRelationships::renderRows

Same name and namespace in other branches
  1. 8.x-3.x src/Form/ManageResolverRelationships.php \Drupal\ctools\Form\ManageResolverRelationships::renderRows()

Render the rows.

Parameters

mixed $cached_values: The arbitrary value from temporary storage.

Return value

array The array context.

1 call to ManageResolverRelationships::renderRows()
ManageResolverRelationships::buildForm in src/Form/ManageResolverRelationships.php
Form constructor.

File

src/Form/ManageResolverRelationships.php, line 175

Class

ManageResolverRelationships
Provider manage resolver relationships.

Namespace

Drupal\ctools\Form

Code

protected function renderRows($cached_values) {
  $contexts = [];
  foreach ($this->getContexts($cached_values) as $row => $context) {
    [
      $route_name,
      $route_parameters,
    ] = $this->getRelationshipOperationsRouteInfo($cached_values, $this->machine_name, $row);
    $build = [
      '#type' => 'operations',
      '#links' => $this->getOperations($cached_values, $row, $route_name, $route_parameters),
    ];
    $contexts[$row] = [
      $row,
      $context->getContextDefinition()
        ->getLabel(),
      $context->getContextDefinition()
        ->getDataType(),
      'operations' => [
        'data' => $build,
      ],
    ];
  }
  return $contexts;
}