You are here

protected function CommerceFileLicenseEntity::_init_field_value in Commerce File 7

Initialize a field value array

3 calls to CommerceFileLicenseEntity::_init_field_value()
CommerceFileLicenseEntity::_add_field_value in includes/commerce_file_license.entity.inc
Add field value
CommerceFileLicenseEntity::_init_fields in includes/commerce_file_license.entity.inc
Initialize all unset fields for default field langauage
CommerceFileLicenseEntity::_set_field_value in includes/commerce_file_license.entity.inc
Set field value

File

includes/commerce_file_license.entity.inc, line 486
Provides a base class for CommerceFileLicenseEntity.

Class

CommerceFileLicenseEntity
A Commerce File License entity class.

Code

protected function _init_field_value($field_name, $langcode = LANGUAGE_NONE) {
  if (empty($this->{$field_name})) {
    $this->{$field_name} = array(
      $langcode => array(),
    );
  }
  elseif (empty($this->{$field_name}[$langcode])) {
    $this->{$field_name}[$langcode] = array();
  }
}