You are here

public function Campaigns::loadAsOptions in SimpleAds 8

File

src/Campaigns.php, line 136

Class

Campaigns
Campaigns utility class.

Namespace

Drupal\simpleads

Code

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