You are here

public static function ConfigBit::doWeHaveThisConfigBit in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.5

Same name and namespace in other branches
  1. 8.8 src/Config/ConfigBit.php \Drupal\varbase\Config\ConfigBit::doWeHaveThisConfigBit()
  2. 8.4 src/Config/ConfigBit.php \Drupal\varbase\config\ConfigBit::doWeHaveThisConfigBit()
  3. 8.6 src/Config/ConfigBit.php \Drupal\varbase\config\ConfigBit::doWeHaveThisConfigBit()
  4. 8.7 src/Config/ConfigBit.php \Drupal\varbase\config\ConfigBit::doWeHaveThisConfigBit()
  5. 9.0.x src/Config/ConfigBit.php \Drupal\varbase\Config\ConfigBit::doWeHaveThisConfigBit()

Do we have this cofnigbit file.

Parameters

string $config_bit_file_name: Config bit file name in the root configbit folder.

string $type: Config bit file source type (profile / module).

string $project: Config bit file source eg. varbase.

Return value

boolan True/False if the file exists.

File

src/Config/ConfigBit.php, line 60

Class

ConfigBit
Defines config bit to help in managing custom config which used in install.

Namespace

Drupal\varbase\config

Code

public static function doWeHaveThisConfigBit($config_bit_file_name, $type = 'profile', $project = 'varbase') {

  // Generate full path to config file.
  $full_config_bit_file_name = drupal_get_path($type, $project) . '/' . $config_bit_file_name;
  return file_exists($full_config_bit_file_name);
}