You are here

protected function GroupBaseForm::groupIdExists in Entity Share 8

Same name and namespace in other branches
  1. 8.3 modules/entity_share_server/src/Form/GroupBaseForm.php \Drupal\entity_share_server\Form\GroupBaseForm::groupIdExists()
  2. 8.2 modules/entity_share_server/src/Form/GroupBaseForm.php \Drupal\entity_share_server\Form\GroupBaseForm::groupIdExists()

Check if the group exists.

Return value

bool True if the group exists. FALSE otherwise.

4 calls to GroupBaseForm::groupIdExists()
GroupDeleteForm::actions in modules/entity_share_server/src/Form/GroupDeleteForm.php
Returns an array of supported actions for the current entity form.
GroupDeleteForm::form in modules/entity_share_server/src/Form/GroupDeleteForm.php
Gets the actual form array to be built.
GroupEditForm::actions in modules/entity_share_server/src/Form/GroupEditForm.php
Returns an array of supported actions for the current entity form.
GroupEditForm::form in modules/entity_share_server/src/Form/GroupEditForm.php
Gets the actual form array to be built.

File

modules/entity_share_server/src/Form/GroupBaseForm.php, line 110

Class

GroupBaseForm
Class GroupBaseForm.

Namespace

Drupal\entity_share_server\Form

Code

protected function groupIdExists() {

  /** @var \Drupal\entity_share_server\Entity\ChannelInterface $channel */
  $channel = $this->entity;
  $channel_groups = $channel
    ->get('channel_groups');
  $group_id = $this
    ->getgroupId();
  $group_exists = FALSE;
  if (isset($channel_groups[$group_id])) {
    $group_exists = TRUE;
  }
  return $group_exists;
}