You are here

public function ApiDoc::shouldCreateNewRevision in Apigee API Catalog 8

Same name and namespace in other branches
  1. 8.2 src/Entity/ApiDoc.php \Drupal\apigee_api_catalog\Entity\ApiDoc::shouldCreateNewRevision()

Gets whether a new revision should be created by default.

Return value

bool TRUE if a new revision should be created by default.

File

src/Entity/ApiDoc.php, line 192

Class

ApiDoc
Defines the API Doc entity.

Namespace

Drupal\apigee_api_catalog\Entity

Code

public function shouldCreateNewRevision() {
  $config = \Drupal::config(ApiDocSettingsForm::CONFIG_NAME);
  $default_revision = $config
    ->get('default_revision');
  return is_null($default_revision) ? TRUE : (bool) $default_revision;
}