rules-8.x-3.x-dev/src/TypedData/Options/OnOffOptions.php

src/TypedData/Options/OnOffOptions.php
<?php

declare(strict_types=1);

namespace Drupal\rules\TypedData\Options;

use Drupal\Core\Session\AccountInterface;

/**
 * Options provider to return an On / Off choice.
 */
class OnOffOptions extends OptionsProviderBase {

  /**
   * {@inheritdoc}
   */
  public function getPossibleOptions(?AccountInterface $account = NULL) {
    return [
      0 => $this->t('Off'),
      1 => $this->t('On'),
    ];
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc