You are here

public function ConfigTest::isInstallable in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest::isInstallable()

Checks whether this entity is installable.

For example, a default view might not be installable if the base table doesn't exist.

Return value

bool TRUE if the entity is installable, FALSE otherwise.

Overrides ConfigEntityBase::isInstallable

File

core/modules/config/tests/config_test/src/Entity/ConfigTest.php, line 187

Class

ConfigTest
Defines the ConfigTest configuration entity.

Namespace

Drupal\config_test\Entity

Code

public function isInstallable() {
  return $this->id != 'isinstallable' || \Drupal::state()
    ->get('config_test.isinstallable');
}