Tripal
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Drupal\tripal\Form\TripalEntityTypeForm Class Reference
Inheritance diagram for Drupal\tripal\Form\TripalEntityTypeForm:
Inheritance graph
[legend]
Collaboration diagram for Drupal\tripal\Form\TripalEntityTypeForm:
Collaboration graph
[legend]

Public Member Functions

 form (array $form, FormStateInterface $form_state)
 
 validateForm (array &$form, FormStateInterface $form_state)
 
 save (array $form, FormStateInterface $form_state)
 

Protected Member Functions

 validateLabel (array $values, FormStateInterface $form_state)
 
 validateTerm (array $values, FormStateInterface $form_state)
 
 validateTokenFormats (array $values, FormStateInterface $form_state)
 
 getValidTokens ($tripal_entity_type, bool $brackets)
 

Member Function Documentation

◆ form()

Drupal\tripal\Form\TripalEntityTypeForm::form ( array  $form,
FormStateInterface  $form_state 
)

{}

◆ getValidTokens()

Drupal\tripal\Form\TripalEntityTypeForm::getValidTokens (   $tripal_entity_type,
bool  $brackets 
)
protected

Returns an array of valid tokens that may be used in an entity title.

Parameters
object$tripal_entity_type
bool$bracketsIf TRUE, returned list of tokens is wrapped in square brackets
Returns
array A list of valid tokens.

◆ save()

Drupal\tripal\Form\TripalEntityTypeForm::save ( array  $form,
FormStateInterface  $form_state 
)

{}

◆ validateForm()

Drupal\tripal\Form\TripalEntityTypeForm::validateForm ( array &  $form,
FormStateInterface  $form_state 
)

{}

◆ validateLabel()

Drupal\tripal\Form\TripalEntityTypeForm::validateLabel ( array  $values,
FormStateInterface  $form_state 
)
protected

Validate the label for the bundle.

Helper method for validateForm().

Parameters
array$valuesThe values submitted to the form.
FormStateInterface$form_stateThe form state (used to set errors).
Returns
bool Returns TRUE if the label is valid and FALSE if any errors were set on the form.

◆ validateTerm()

Drupal\tripal\Form\TripalEntityTypeForm::validateTerm ( array  $values,
FormStateInterface  $form_state 
)
protected

Validate the term for the bundle.

Helper method for validateForm().

Parameters
array$valuesThe values submitted to the form.
FormStateInterface$form_stateThe form state (used to set errors).
Returns
bool Returns TRUE if the term is valid and FALSE if any errors were set on the form.

◆ validateTokenFormats()

Drupal\tripal\Form\TripalEntityTypeForm::validateTokenFormats ( array  $values,
FormStateInterface  $form_state 
)
protected

Validate the title + url alias token formats for the bundle.

Helper method for validateForm().

Parameters
array$valuesThe values submitted to the form.
FormStateInterface$form_stateThe form state (used to set errors).
Returns
bool Returns TRUE if the formats is valid and FALSE if any errors were set on the form.

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