public function CommerceFileLicenseEntity::get_file in Commerce File 7
File
- Read / Write
4 calls to CommerceFileLicenseEntity::get_file()
- CommerceFileLicenseEntity::defaultLabel in includes/
commerce_file_license.entity.inc - Specifies the default label, which is picked up by label() by default.
- CommerceFileLicenseEntity::get_file_entity in includes/
commerce_file_license.entity.inc - File Entity
- CommerceFileLicenseEntity::get_limits in includes/
commerce_file_license.entity.inc - Aggregated Limits
- CommerceFileLicenseEntity::set_file in includes/
commerce_file_license.entity.inc - Set file field item values
File
- includes/
commerce_file_license.entity.inc, line 379 - Provides a base class for CommerceFileLicenseEntity.
Class
- CommerceFileLicenseEntity
- A Commerce File License entity class.
Code
public function get_file() {
if (!isset($this->file)) {
$this->file = array();
// aggregate file fields on this license
$files = _commerce_file_field_aggregate_files($this, COMMERCE_FILE_LICENSE_ENTITY_NAME);
if (!empty($files)) {
// there can be only 1
$this->file = reset($files);
}
}
return $this->file;
}