public function AdminModeration::__construct in moderated content bulk publish 8
Same name and namespace in other branches
- 2.0.x src/AdminModeration.php \Drupal\moderated_content_bulk_publish\AdminModeration::__construct()
- 1.0.x src/AdminModeration.php \Drupal\moderated_content_bulk_publish\AdminModeration::__construct()
File
- src/
AdminModeration.php, line 20
Class
- AdminModeration
- A Helper Class to assist with the publishing and unpublishing bulk action.
Namespace
Drupal\moderated_content_bulk_publishCode
public function __construct($entity, $status) {
$this->entity = $entity;
if (!is_null($status)) {
$this->status = $status;
}
$this->id = $this->entity
->id();
}