You are here

public function Groups::loadAsOptions in SimpleAds 8

File

src/Groups.php, line 113

Class

Groups
Groups utility class.

Namespace

Drupal\simpleads

Code

public function loadAsOptions() {
  $options = [];
  $options[''] = $this
    ->t('- None -');
  foreach ($this
    ->loadAll() as $item) {
    $options[$item
      ->getId()] = $item
      ->getGroupName();
  }
  return $options;
}