Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[generate:entity:content] isPublished() returns FALSE for published entities #1755

Closed
HaleFx opened this issue Jan 19, 2016 · 2 comments
Closed

Comments

@HaleFx
Copy link

HaleFx commented Jan 19, 2016

$this->getEntityKey('status') does not seem to return a value for a content entity (no bundle) with status = 1. As a test, I swapped it with $this->get('status')->value and then isPublished() worked fine.

public function isPublished() {
  return (bool) $this->getEntityKey('status');
}
@chuongle
Copy link
Contributor

I got it working by adding "status" = "status" to the entity_keys or using @HaleFx solution.

@enzolutions
Copy link
Contributor

Fixed with PR #1820

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants