You are here

PostSettingsForm.php in Open Social 8.2

File

modules/social_features/social_post/src/Form/PostSettingsForm.php
View source
<?php

namespace Drupal\social_post\Form;

use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;

/**
 * Class PostSettingsForm.
 *
 * @package Drupal\social_post\Form
 *
 * @ingroup social_post
 */
class PostSettingsForm extends FormBase {

  /**
   * Returns a unique string identifying the form.
   *
   * @return string
   *   The unique string identifying the form.
   */
  public function getFormId() {
    return 'Post_settings';
  }

  /**
   * Form submission handler.
   *
   * @param array $form
   *   An associative array containing the structure of the form.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The current state of the form.
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {

    // Empty implementation of the abstract submit class.
  }

  /**
   * Defines the settings form for Post entities.
   *
   * @param array $form
   *   An associative array containing the structure of the form.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The current state of the form.
   *
   * @return array
   *   Form definition array.
   */
  public function buildForm(array $form, FormStateInterface $form_state) {
    $form['Post_settings']['#markup'] = $this
      ->t('Settings form for Post entities. Manage field settings here.');
    return $form;
  }

}

Classes

Namesort descending Description
PostSettingsForm Class PostSettingsForm.