You are here

public function AnonymousPublishingClService::isContentTypeAllowed in Anonymous Publishing 8

Check if the content type can be published anonymously.

Parameters

string $type: The content type to check.

Return value

bool TRUE if the content type can be published anonymously, FALSE otherwise.

File

modules/anonymous_publishing_cl/src/Services/AnonymousPublishingClService.php, line 101

Class

AnonymousPublishingClService
Helper methods for Anonymous Publishing CL.

Namespace

Drupal\anonymous_publishing_cl\Services

Code

public function isContentTypeAllowed($type) {
  $types = $this->configFactory
    ->get('anonymous_publishing_cl.settings')
    ->get('allowed_content_types');
  return isset($types) && !empty($types[$type]);
}