You are here

public function BackgroundImage::getType in Background Image 8

Same name and namespace in other branches
  1. 2.x src/Entity/BackgroundImage.php \Drupal\background_image\Entity\BackgroundImage::getType()
  2. 2.0.x src/Entity/BackgroundImage.php \Drupal\background_image\Entity\BackgroundImage::getType()

The type.

Return value

int

Overrides BackgroundImageInterface::getType

5 calls to BackgroundImage::getType()
BackgroundImage::getParent in src/Entity/BackgroundImage.php
Retrieves the parent background image, if one exists.
BackgroundImage::getTargetEntity in src/Entity/BackgroundImage.php
Retrieves the target entity, if the type is supported and exists.
BackgroundImage::getTargetEntityBundle in src/Entity/BackgroundImage.php
Retrieves the target entity bundle, if the type is supported and exists.
BackgroundImage::getTargetView in src/Entity/BackgroundImage.php
Retrieves the target entity view, if the type is supported and exists.
BackgroundImage::getTypeLabel in src/Entity/BackgroundImage.php
The type label.

File

src/Entity/BackgroundImage.php, line 564

Class

BackgroundImage
Defines the Background Image entity.

Namespace

Drupal\background_image\Entity

Code

public function getType() {
  return (int) $this
    ->get('type')->value;
}