You are here

protected function EntityFormProxy::getCurrentValue in Lightning Media 8.4

Same name and namespace in other branches
  1. 8.3 src/Plugin/EntityBrowser/Widget/EntityFormProxy.php \Drupal\lightning_media\Plugin\EntityBrowser\Widget\EntityFormProxy::getCurrentValue()

Returns the current input value, if any.

Parameters

\Drupal\Core\Form\FormStateInterface $form_state: The current form state.

Return value

mixed The input value, ready for further processing. Nothing will be done with the value if it's empty.

6 calls to EntityFormProxy::getCurrentValue()
EmbedCode::getCurrentValue in src/Plugin/EntityBrowser/Widget/EmbedCode.php
Returns the current input value, if any.
EntityFormProxy::getCurrentEntity in src/Plugin/EntityBrowser/Widget/EntityFormProxy.php
Returns a media entity created from the current input, if possible.
EntityFormProxy::getCurrentTypes in src/Plugin/EntityBrowser/Widget/EntityFormProxy.php
Returns all media types that can apply to the current input.
EntityFormProxy::getForm in src/Plugin/EntityBrowser/Widget/EntityFormProxy.php
EntityFormProxy::validate in src/Plugin/EntityBrowser/Widget/EntityFormProxy.php

... See full list

2 methods override EntityFormProxy::getCurrentValue()
EmbedCode::getCurrentValue in src/Plugin/EntityBrowser/Widget/EmbedCode.php
Returns the current input value, if any.
FileUpload::getCurrentValue in src/Plugin/EntityBrowser/Widget/FileUpload.php
Returns the current input value, if any.

File

src/Plugin/EntityBrowser/Widget/EntityFormProxy.php, line 213

Class

EntityFormProxy
Base class for EB widgets which wrap around an (inline) entity form.

Namespace

Drupal\lightning_media\Plugin\EntityBrowser\Widget

Code

protected function getCurrentValue(FormStateInterface $form_state) {
  return $form_state
    ->getValue('input');
}