protected function Lingotek::getResource in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Lingotek.php \Drupal\lingotek\Lingotek::getResource()
- 4.0.x src/Lingotek.php \Drupal\lingotek\Lingotek::getResource()
- 3.0.x src/Lingotek.php \Drupal\lingotek\Lingotek::getResource()
- 3.1.x src/Lingotek.php \Drupal\lingotek\Lingotek::getResource()
- 3.2.x src/Lingotek.php \Drupal\lingotek\Lingotek::getResource()
- 3.3.x src/Lingotek.php \Drupal\lingotek\Lingotek::getResource()
- 3.4.x src/Lingotek.php \Drupal\lingotek\Lingotek::getResource()
- 3.5.x src/Lingotek.php \Drupal\lingotek\Lingotek::getResource()
- 3.6.x src/Lingotek.php \Drupal\lingotek\Lingotek::getResource()
- 3.7.x src/Lingotek.php \Drupal\lingotek\Lingotek::getResource()
- 3.8.x src/Lingotek.php \Drupal\lingotek\Lingotek::getResource()
3 calls to Lingotek::getResource()
- Lingotek::getProjects in src/
Lingotek.php - Lingotek::getVaults in src/
Lingotek.php - Lingotek::getWorkflows in src/
Lingotek.php
File
- src/
Lingotek.php, line 272 - Contains \Drupal\lingotek\Lingotek.
Class
Namespace
Drupal\lingotekCode
protected function getResource($resources_key, $func, $force = FALSE) {
$data = $this
->get($resources_key);
if (empty($data) || $force) {
$community_id = $this
->get('default.community');
$data = $this->api
->{$func}($community_id);
$this
->set($resources_key, $data);
$keys = explode(".", $resources_key);
$default_key = 'default.' . end($keys);
$this
->setValidDefaultIfNotSet($default_key, $data);
}
return $data;
}