You are here

public function CommerceFileLicenseEntity::get_line_item_ids in Commerce File 7

Line item ids

  • Read Only

Return value

An array of referenced line item ids

File

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

Class

CommerceFileLicenseEntity
A Commerce File License entity class.

Code

public function get_line_item_ids() {
  if (!isset($this->line_item_ids)) {
    $ids = array();
    $field_name = _commerce_file_get_field_names('license_line_items');
    $field_value = $this
      ->_get_field_value($field_name);
    if (!empty($field_value)) {
      foreach ($field_value as $item) {
        $ids[] = $item['line_item_id'];
      }
    }
    $this->line_item_ids = $ids;
  }
  return $this->line_item_ids;
}