You are here

private function ExifFieldWidgetBase::retrieveExifFieldDefaultValue in Exif 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldWidget/ExifFieldWidgetBase.php \Drupal\exif\Plugin\Field\FieldWidget\ExifFieldWidgetBase::retrieveExifFieldDefaultValue()

Get exif field name associated to this drupal field.

If none found, use naming convention.

Return value

string name of the exif field or string 'naming_convention'.

1 call to ExifFieldWidgetBase::retrieveExifFieldDefaultValue()
ExifFieldWidgetBase::settingsForm in src/Plugin/Field/FieldWidget/ExifFieldWidgetBase.php
Returns a form to configure settings for the widget.

File

src/Plugin/Field/FieldWidget/ExifFieldWidgetBase.php, line 116

Class

ExifFieldWidgetBase
Class ExifFieldWidgetBase provide base methods for all widgets.

Namespace

Drupal\exif\Plugin\Field\FieldWidget

Code

private function retrieveExifFieldDefaultValue() {
  $result = $this
    ->getSetting('exif_field');
  if (empty($result)) {
    $result = 'naming_convention';
  }
  return $result;
}