You are here

public function ManageConditions::renderRows in Chaos Tool Suite (ctools) 8.3

Parameters

$cached_values:

Return value

array

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

File

src/Form/ManageConditions.php, line 130

Class

ManageConditions

Namespace

Drupal\ctools\Form

Code

public function renderRows($cached_values) {
  $configured_conditions = [];
  foreach ($this
    ->getConditions($cached_values) as $row => $condition) {

    /** @var $instance \Drupal\Core\Condition\ConditionInterface */
    $instance = $this->manager
      ->createInstance($condition['id'], $condition);
    list($route_name, $route_parameters) = $this
      ->getOperationsRouteInfo($cached_values, $cached_values['id'], $row);
    $build = [
      '#type' => 'operations',
      '#links' => $this
        ->getOperations($route_name, $route_parameters),
    ];
    $configured_conditions[] = [
      $instance
        ->getPluginId(),
      $instance
        ->summary(),
      'operations' => [
        'data' => $build,
      ],
    ];
  }
  return $configured_conditions;
}