You are here

public function Ads::loadAsOptions in SimpleAds 8

File

src/Ads.php, line 156

Class

Ads
Ads utility class.

Namespace

Drupal\simpleads

Code

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