Drupal 8  8.0.2
ForumForm Class Reference
Inheritance diagram for ForumForm:

Public Member Functions

 form (array $form, FormStateInterface $form_state)
 
 buildEntity (array $form, FormStateInterface $form_state)
 
 save (array $form, FormStateInterface $form_state)
 
- Public Member Functions inherited from TermForm
 form (array $form, FormStateInterface $form_state)
 
 validateForm (array &$form, FormStateInterface $form_state)
 
 buildEntity (array $form, FormStateInterface $form_state)
 
 save (array $form, FormStateInterface $form_state)
 
- Public Member Functions inherited from ContentEntityForm
 __construct (EntityManagerInterface $entity_manager)
 
 form (array $form, FormStateInterface $form_state)
 
 submitForm (array &$form, FormStateInterface $form_state)
 
 getFormLangcode (FormStateInterface $form_state)
 
 isDefaultFormLangcode (FormStateInterface $form_state)
 
 getFormDisplay (FormStateInterface $form_state)
 
 setFormDisplay (EntityFormDisplayInterface $form_display, FormStateInterface $form_state)
 
 updateFormLangcode ($entity_type_id, EntityInterface $entity, array $form, FormStateInterface $form_state)
 
 updateChangedTime (EntityInterface $entity)
 
- Public Member Functions inherited from EntityForm
 setOperation ($operation)
 
 getBaseFormId ()
 
 getFormId ()
 
 buildForm (array $form, FormStateInterface $form_state)
 
 form (array $form, FormStateInterface $form_state)
 
 processForm ($element, FormStateInterface $form_state, $form)
 
 afterBuild (array $element, FormStateInterface $form_state)
 
 submitForm (array &$form, FormStateInterface $form_state)
 
 save (array $form, FormStateInterface $form_state)
 
 buildEntity (array $form, FormStateInterface $form_state)
 
 getEntity ()
 
 setEntity (EntityInterface $entity)
 
 getEntityFromRouteMatch (RouteMatchInterface $route_match, $entity_type_id)
 
 getOperation ()
 
 setModuleHandler (ModuleHandlerInterface $module_handler)
 
 setEntityManager (EntityManagerInterface $entity_manager)
 
 setEntityTypeManager (EntityTypeManagerInterface $entity_type_manager)
 
- Public Member Functions inherited from EntityFormInterface
 setStringTranslation (TranslationInterface $string_translation)
 

Protected Member Functions

 actions (array $form, FormStateInterface $form_state)
 
 forumParentSelect ($tid, $title)
 
- Protected Member Functions inherited from ContentEntityForm
 getEditedFieldNames (FormStateInterface $form_state)
 
 init (FormStateInterface $form_state)
 
 initFormLangcodes (FormStateInterface $form_state)
 
 copyFormValuesToEntity (EntityInterface $entity, array $form, FormStateInterface $form_state)
 
- Protected Member Functions inherited from EntityForm
 init (FormStateInterface $form_state)
 
 actionsElement (array $form, FormStateInterface $form_state)
 
 actions (array $form, FormStateInterface $form_state)
 
 copyFormValuesToEntity (EntityInterface $entity, array $form, FormStateInterface $form_state)
 
 prepareEntity ()
 
 prepareInvokeAll ($hook, FormStateInterface $form_state)
 

Protected Attributes

 $forumFormType
 
 $urlStub = 'forum'
 
- Protected Attributes inherited from ContentEntityForm
 $entityManager
 
- Protected Attributes inherited from EntityForm
 $operation
 
 $moduleHandler
 
 $entityManager
 
 $entityTypeManager
 
 $entity
 

Additional Inherited Members

- Static Public Member Functions inherited from ContentEntityForm
static create (ContainerInterface $container)
 

Detailed Description

Base form for forum term edit forms.

Member Function Documentation

actions ( array  $form,
FormStateInterface  $form_state 
)
protected

{}

buildEntity ( array  $form,
FormStateInterface  $form_state 
)

{Builds an updated entity object based upon the submitted form values.For building the updated entity object the form's entity is cloned and the submitted form values are copied to entity properties. The form's entity remains unchanged.

See Also
::getEntity()
Parameters
array$formA nested array form elements comprising the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
Returns
An updated copy of the form's entity object.
}

Implements EntityFormInterface.

References FormStateInterface\getValue().

Here is the call graph for this function:

form ( array  $form,
FormStateInterface  $form_state 
)

{}

References ForumForm\forumParentSelect(), and t().

Here is the call graph for this function:

forumParentSelect (   $tid,
  $title 
)
protected

Returns a select box for available parent terms.

Parameters
int$tidID of the term that is being added or edited.
string$titleTitle for the select box.
Returns
array A select form element.

References Drupal\config(), Drupal\entityManager(), and t().

Referenced by ForumForm\form().

Here is the call graph for this function:

Here is the caller graph for this function:

save ( array  $form,
FormStateInterface  $form_state 
)

{Form submission handler for the 'save' action.Normally this method should be overridden to provide specific messages to the user and redirect the form after the entity has been saved.

Parameters
array$formAn associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
Returns
int Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed.
}

Implements EntityFormInterface.

References Drupal\entityManager(), Drupal\l(), Drupal\logger(), FormStateInterface\setRedirect(), FormStateInterface\setValue(), and t().

Here is the call graph for this function:


The documentation for this class was generated from the following file: