public function InvoiceType::getLogoFile in Commerce Invoice 8.2
Gets the logo file entity.
Return value
\Drupal\file\FileInterface|null The logo file entity or NULL if it does not exist.
Overrides InvoiceTypeInterface::getLogoFile
2 calls to InvoiceType::getLogoFile()
- InvoiceType::calculateDependencies in src/
Entity/ InvoiceType.php - Calculates dependencies and stores them in the dependency property.
- InvoiceType::getLogoUrl in src/
Entity/ InvoiceType.php - Gets the logo URL.
File
- src/
Entity/ InvoiceType.php, line 152
Class
- InvoiceType
- Defines the invoice type entity class.
Namespace
Drupal\commerce_invoice\EntityCode
public function getLogoFile() {
if ($this->logo) {
/** @var \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository */
$entity_repository = \Drupal::service('entity.repository');
return $entity_repository
->loadEntityByUuid('file', $this->logo);
}
return NULL;
}