REST and Application Integration

Integrating third-party applications using REST and related operations. Overview of web services Web services make it possible for applications and web sites to read and update information from other web sites. There are several standard techniques for providing web services, including: SOAP: http://wikipedia.org/wiki/SOAP XML-RPC: http://wikipedia.org/wiki/XML-RPC REST: http://wikipedia.org/wiki/Representational_state_transfer Drupal sites can both provide web services and integrate th

WidgetBase::addMoreAjax

public static WidgetBase::addMoreAjax(array $form, FormStateInterface $form_state) Ajax callback for the "Add another item" button. This returns the new page content to replace the page content made obsolete by the form submission. File core/lib/Drupal/Core/Field/WidgetBase.php, line 291 Class WidgetBase Base class for 'Field widget' plugin implementations. Namespace Drupal\Core\Field Code public static function addMoreAjax(array $form, FormStateInterface $form_state) { $button = $fo

EntityDisplayFormBase::buildFieldRow

protected EntityDisplayFormBase::buildFieldRow(FieldDefinitionInterface $field_definition, array $form, FormStateInterface $form_state) Builds the table row structure for a single field. Parameters \Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition. array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value array A table row array. File core/modules/field

EntityDisplayFormBase::form

public EntityDisplayFormBase::form(array $form, FormStateInterface $form_state) Gets the actual form array to be built. Overrides EntityForm::form See also \Drupal\Core\Entity\EntityForm::processForm() \Drupal\Core\Entity\EntityForm::afterBuild() File core/modules/field_ui/src/Form/EntityDisplayFormBase.php, line 136 Class EntityDisplayFormBase Base class for EntityDisplay edit forms. Namespace Drupal\field_ui\Form Code public function form(array $form, FormStateInterface $form_state)

hook_quickedit_render_field

hook_quickedit_render_field(Drupal\Core\Entity\EntityInterface $entity, $field_name, $view_mode_id, $langcode) Returns a renderable array for the value of a single field in an entity. To integrate with in-place field editing when a non-standard render pipeline is used (FieldItemListInterface::view() is not sufficient to render back the field following in-place editing in the exact way it was displayed originally), implement this hook. Edit module integrates with HTML elements with data-edit-fie

EnforcedResponse

A wrapper containing a response which is to be enforced upon delivery. The FormBuilder throws an EnforcedResponseException whenever a form desires to explicitly set a response object. Exception handlers capable of setting the response should extract the response object of such an exception using EnforcedResponse::createFromException(). Then wrap it into an EnforcedResponse object and replace the original response with the wrapped response. Hierarchy class \Symfony\Component\HttpFoundation\Respo

ModulesListConfirmForm::submitForm

public ModulesListConfirmForm::submitForm(array &$form, FormStateInterface $form_state) Form submission handler. Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Overrides FormInterface::submitForm File core/modules/system/src/Form/ModulesListConfirmForm.php, line 159 Class ModulesListConfirmForm Builds a confirmation form for enabling modules with dependencies. Namespa

ImageStyleEditForm

Controller for image style edit form. Hierarchy class \Drupal\Core\Form\FormBase implements ContainerInjectionInterface, FormInterface uses DependencySerializationTrait, LoggerChannelTrait, LinkGeneratorTrait, RedirectDestinationTrait, UrlGeneratorTrait, StringTranslationTraitclass \Drupal\Core\Entity\EntityForm implements EntityFormInterfaceclass \Drupal\image\Form\ImageStyleFormBaseclass \Drupal\image\Form\ImageStyleEditForm File core/modules/image/src/Form/ImageStyleEditForm.php, line

FormBuilderInterface::submitForm

public FormBuilderInterface::submitForm($form_arg, FormStateInterface &$form_state) Retrieves, populates, and processes a form. This function allows you to supply values for form elements and submit a form for processing. Compare to self::getForm(), which also builds and processes a form, but does not allow you to supply values. There is no return value, but you can check to see if there are errors by calling $form_state->getErrors(). // register a new user $form_state = new FormState();

ChainedFastBackend::set

public ChainedFastBackend::set($cid, $data, $expire = Cache::PERMANENT, array $tags = array()) Stores data in the persistent cache. Core cache implementations set the created time on cache item with microtime(TRUE) rather than REQUEST_TIME_FLOAT, because the created time of cache items should match when they are created, not when the request started. Apart from being more accurate, this increases the chance an item will legitimately be considered valid. Parameters string $cid: The cache ID of