You are here

protected function FilterBaseForm::getGroupOptions in Entity Share 8.3

Same name and namespace in other branches
  1. 8 modules/entity_share_server/src/Form/FilterBaseForm.php \Drupal\entity_share_server\Form\FilterBaseForm::getGroupOptions()
  2. 8.2 modules/entity_share_server/src/Form/FilterBaseForm.php \Drupal\entity_share_server\Form\FilterBaseForm::getGroupOptions()

Helper function to get the conjunction options.

Return value

array An array of options.

2 calls to FilterBaseForm::getGroupOptions()
FilterAddForm::form in modules/entity_share_server/src/Form/FilterAddForm.php
Gets the actual form array to be built.
FilterEditForm::form in modules/entity_share_server/src/Form/FilterEditForm.php
Gets the actual form array to be built.

File

modules/entity_share_server/src/Form/FilterBaseForm.php, line 32

Class

FilterBaseForm
Base class for filter form.

Namespace

Drupal\entity_share_server\Form

Code

protected function getGroupOptions() {

  /** @var \Drupal\entity_share_server\Entity\ChannelInterface $channel */
  $channel = $this->entity;
  $channel_groups = $channel
    ->get('channel_groups');
  if (is_null($channel_groups)) {
    $channel_groups = [];
  }
  $member_options = array_keys($channel_groups);
  return array_combine($member_options, $member_options);
}