You are here

public function Text::createFormSubmit in SimpleAds 8

Create an ad.

Overrides SimpleAdsTypeBase::createFormSubmit

File

src/Plugin/SimpleAds/Type/Text.php, line 37

Class

Text
Text Ad type.

Namespace

Drupal\simpleads\Plugin\SimpleAds\Type

Code

public function createFormSubmit($options, FormStateInterface $form_state, $type = NULL) {
  if ($text = $form_state
    ->getValue('text')) {
    $options['text'] = $text;
  }
  return $options;
}