You are here

public function LanguageItem::applyDefaultValue in Custom Language field 8

Applies the default value.

Parameters

bool $notify: (optional) Whether to notify the parent object of the change. Defaults to TRUE. If a property is updated from a parent object, set it to FALSE to avoid being notified again.

Return value

$this Returns itself to allow for chaining.

Overrides LanguageItem::applyDefaultValue

File

src/Plugin/Field/FieldType/LanguageItem.php, line 142

Class

LanguageItem
Plugin implementation of the 'language' field type.

Namespace

Drupal\languagefield\Plugin\Field\FieldType

Code

public function applyDefaultValue($notify = TRUE) {

  // Default to no default value.
  $this
    ->setValue(NULL, $notify);
  return $this;
}