CommentForm::preview

public CommentForm::preview(array &$form, FormStateInterface $form_state) Form submission handler for the 'preview' action. Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. File core/modules/comment/src/CommentForm.php, line 338 Class CommentForm Base handler for comment forms. Namespace Drupal\comment Code public function preview(array &$form, FormStateInterface

CommentForm::create

public static CommentForm::create(ContainerInterface $container) Instantiates a new instance of this class. This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton. Parameters \Symfony\Component\DependencyInjection\ContainerInterface $container: The service cont

CommentForm::actions

protected CommentForm::actions(array $form, FormStateInterface $form_state) Returns an array of supported actions for the current entity form. @todo Consider introducing a 'preview' action here, since it is used by many entity types. Overrides EntityForm::actions File core/modules/comment/src/CommentForm.php, line 227 Class CommentForm Base handler for comment forms. Namespace Drupal\comment Code protected function actions(array $form, FormStateInterface $form_state) { $element = par

CommentForm::flagViolations

protected CommentForm::flagViolations(EntityConstraintViolationListInterface $violations, array $form, FormStateInterface $form_state) Flags violations for the current form. If the entity form customly adds some fields to the form (i.e. without using the form display), it needs to add its fields to array returned by getEditedFieldNames() and overwrite this method in order to show any violations for those fields; e.g.: foreach ($violations->getByField('name') as $violation) { $form_state-&g

CommentForm::buildEntity

public CommentForm::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. Parameters array $form: A nested array form elements comprising the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value \Drupal\Core\En

CommentForm::$renderer

The renderer. Type: \Drupal\Core\Render\RendererInterface File core/modules/comment/src/CommentForm.php, line 34 Class CommentForm Base handler for comment forms. Namespace Drupal\comment Code protected $renderer;

CommentForm::form

public CommentForm::form(array $form, FormStateInterface $form_state) Gets the actual form array to be built. Overrides ContentEntityForm::form See also \Drupal\Core\Entity\EntityForm::processForm() \Drupal\Core\Entity\EntityForm::afterBuild() File core/modules/comment/src/CommentForm.php, line 66 Class CommentForm Base handler for comment forms. Namespace Drupal\comment Code public function form(array $form, FormStateInterface $form_state) { /** @var \Drupal\comment\CommentInterfac

CommentForm::$currentUser

The current user. Type: \Drupal\Core\Session\AccountInterface File core/modules/comment/src/CommentForm.php, line 27 Class CommentForm Base handler for comment forms. Namespace Drupal\comment Code protected $currentUser;

CommentForm

Base handler for comment forms. Hierarchy class \Drupal\Core\Form\FormBase implements ContainerInjectionInterface, FormInterface uses DependencySerializationTrait, LoggerChannelTrait, LinkGeneratorTrait, RedirectDestinationTrait, UrlGeneratorTrait, StringTranslationTraitclass \Drupal\Core\Entity\EntityForm implements EntityFormInterfaceclass \Drupal\Core\Entity\ContentEntityForm implements ContentEntityFormInterfaceclass \Drupal\comment\CommentForm File core/modules/comment/src/CommentFor

CommentFieldItemList::offsetExists

public CommentFieldItemList::offsetExists($offset) Overrides ItemList::offsetExists File core/modules/comment/src/CommentFieldItemList.php, line 33 Class CommentFieldItemList Defines a item list class for comment fields. Namespace Drupal\comment Code public function offsetExists($offset) { // For consistency with what happens in get(), we force offsetExists() to // be TRUE for delta 0. if ($offset === 0) { return TRUE; } return parent::offsetExists($offset); }