You are here

public function AdminModeration::__construct in moderated content bulk publish 8

Same name and namespace in other branches
  1. 2.0.x src/AdminModeration.php \Drupal\moderated_content_bulk_publish\AdminModeration::__construct()
  2. 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_publish

Code

public function __construct($entity, $status) {
  $this->entity = $entity;
  if (!is_null($status)) {
    $this->status = $status;
  }
  $this->id = $this->entity
    ->id();
}