You are here

public function PublisherSubscriberStatusCdfAttribute::onBuildClientCdf in Acquia Content Hub 8.2

Method called on the BUILD_CLIENT_CDF event.

Adds publisher/subscriber status to the cdf.

Parameters

\Drupal\acquia_contenthub\Event\BuildClientCdfEvent $event: The BuildClientCdfEvent object.

Throws

\Exception

File

src/EventSubscriber/CdfAttributes/PublisherSubscriberStatusCdfAttribute.php, line 52

Class

PublisherSubscriberStatusCdfAttribute
Extracts user specific data for identifying duplicate and anonymous users.

Namespace

Drupal\acquia_contenthub\EventSubscriber\CdfAttributes

Code

public function onBuildClientCdf(BuildClientCdfEvent $event) {
  $cdf = $event
    ->getCdf();
  $cdf
    ->addAttribute('publisher', CDFAttribute::TYPE_BOOLEAN, $this->checker
    ->isPublisher());
  $cdf
    ->addAttribute('subscriber', CDFAttribute::TYPE_BOOLEAN, $this->checker
    ->isSubscriber());
}