You are here

public function GroupTypeController::buildOperations in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/Controller/GroupTypeController.php \Drupal\group\Entity\Controller\GroupTypeController::buildOperations()

Builds operation links for the group type's content plugins.

Parameters

\Drupal\group\Plugin\GroupContentEnablerInterface $plugin: The content enabler plugin to build operation links for.

bool $is_installed: Whether the plugin is installed.

Return value

array A render array of operation links.

1 call to GroupTypeController::buildOperations()
GroupTypeController::buildRow in src/Entity/Controller/GroupTypeController.php
Builds a row for a content enabler plugin.

File

src/Entity/Controller/GroupTypeController.php, line 276

Class

GroupTypeController
Provides the user permissions administration form for a specific group type.

Namespace

Drupal\group\Entity\Controller

Code

public function buildOperations($plugin, $is_installed) {
  $build = [
    '#type' => 'operations',
    '#links' => $this
      ->getOperations($plugin, $is_installed),
  ];
  uasort($build['#links'], '\\Drupal\\Component\\Utility\\SortArray::sortByWeightElement');
  return $build;
}