Drupal 8  8.0.2
QuickEditController Class Reference
Inheritance diagram for QuickEditController:

Public Member Functions

 __construct (PrivateTempStoreFactory $temp_store_factory, MetadataGeneratorInterface $metadata_generator, EditorSelectorInterface $editor_selector, RendererInterface $renderer)
 
 metadata (Request $request)
 
 attachments (Request $request)
 
 fieldForm (EntityInterface $entity, $field_name, $langcode, $view_mode_id, Request $request)
 
 entitySave (EntityInterface $entity)
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Protected Member Functions

 renderField (EntityInterface $entity, $field_name, $langcode, $view_mode_id)
 

Protected Attributes

 $tempStoreFactory
 
 $metadataGenerator
 
 $editorSelector
 
 $renderer
 

Detailed Description

Returns responses for Quick Edit module routes.

Constructor & Destructor Documentation

__construct ( PrivateTempStoreFactory  $temp_store_factory,
MetadataGeneratorInterface  $metadata_generator,
EditorSelectorInterface  $editor_selector,
RendererInterface  $renderer 
)

Constructs a new QuickEditController.

Parameters
\Drupal\user\PrivateTempStoreFactory$temp_store_factoryThe PrivateTempStore factory.
\Drupal\quickedit\MetadataGeneratorInterface$metadata_generatorThe in-place editing metadata generator.
\Drupal\quickedit\EditorSelectorInterface$editor_selectorThe in-place editor selector.
\Drupal\Core\Render\RendererInterface$rendererThe renderer.

Member Function Documentation

attachments ( Request  $request)

Returns AJAX commands to load in-place editors' attachments.

Given a list of in-place editor IDs as POST parameters, render AJAX commands to load those in-place editors.

Returns
The Ajax response.
static create ( ContainerInterface  $container)
static

{}

entitySave ( EntityInterface  $entity)

Saves an entity into the database, from PrivateTempStore.

Parameters
\Drupal\Core\Entity\EntityInterface$entityThe entity being edited.
Returns
The Ajax response.

References EntityInterface\getEntityTypeId(), EntityInterface\id(), and EntityInterface\uuid().

Here is the call graph for this function:

fieldForm ( EntityInterface  $entity,
  $field_name,
  $langcode,
  $view_mode_id,
Request  $request 
)

Returns a single field edit form as an Ajax response.

Parameters
\Drupal\Core\Entity\EntityInterface$entityThe entity being edited.
string$field_nameThe name of the field that is being edited.
string$langcodeThe name of the language for which the field is being edited.
string$view_mode_idThe view mode the field should be rerendered in.
\Symfony\Component\HttpFoundation\Request$requestThe current request object containing the search string.
Returns
The Ajax response.

References Drupal\formBuilder(), QuickEditController\renderField(), and EntityInterface\uuid().

Here is the call graph for this function:

metadata ( Request  $request)

Returns the metadata for a set of fields.

Given a list of field quick edit IDs as POST parameters, run access checks on the entity and field level to determine whether the current user may edit them. Also retrieves other metadata.

Returns
The JSON response.

References Drupal\entityManager().

Here is the call graph for this function:

renderField ( EntityInterface  $entity,
  $field_name,
  $langcode,
  $view_mode_id 
)
protected

Renders a field.

If the view mode ID is not an Entity Display view mode ID, then the field was rendered using a custom render pipeline (not the Entity/Field API render pipeline).

An example could be Views' render pipeline. In that case, the view mode ID would probably contain the View's ID, display and the row index.

Parameters
\Drupal\Core\Entity\EntityInterface$entityThe entity being edited.
string$field_nameThe name of the field that is being edited.
string$langcodeThe name of the language for which the field is being edited.
string$view_mode_idThe view mode the field should be rerendered in. Either an Entity Display view mode ID, or a custom one. See hook_quickedit_render_field().
Returns
Rendered HTML.
See Also
hook_quickedit_render_field()

References Drupal\entityManager(), EntityInterface\getEntityTypeId(), and Drupal\moduleHandler().

Referenced by QuickEditController\fieldForm().

Here is the call graph for this function:

Here is the caller graph for this function:


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