You are here

public function ProductBundle::isPublished in Commerce Product Bundle 8

Returns the product bundle published status indicator.

Unpublished product bundle are only visible to restricted users.

Return value

bool TRUE if the product bundle is published.

Overrides BundleInterface::isPublished

File

src/Entity/ProductBundle.php, line 149

Class

ProductBundle
Defines the product bundle entity.

Namespace

Drupal\commerce_product_bundle\Entity

Code

public function isPublished() {
  return (bool) $this
    ->getEntityKey('status');
}