You are here

public function LingotekFake::getResources in Lingotek Translation 3.6.x

Same name and namespace in other branches
  1. 8 tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getResources()
  2. 8.2 tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getResources()
  3. 4.0.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getResources()
  4. 3.0.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getResources()
  5. 3.1.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getResources()
  6. 3.2.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getResources()
  7. 3.3.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getResources()
  8. 3.4.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getResources()
  9. 3.5.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getResources()
  10. 3.7.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getResources()
  11. 3.8.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getResources()

Gets the account related resources.

Parameters

bool $force: Flag indicating if it must be forced to request from the API. If false, will use local cached data.

Return value

array|bool Array with resources info. FALSE in case of error. The keys are community, project, vault, workflow, and filter. Each of them is a nested array with key the id, and value the name of the resource.

Overrides LingotekInterface::getResources

File

tests/modules/lingotek_test/src/LingotekFake.php, line 125

Class

LingotekFake

Namespace

Drupal\lingotek_test

Code

public function getResources($force = FALSE) {
  $resources = [
    'project' => $this
      ->getProjects($force),
    'vault' => $this
      ->getVaults($force),
    'community' => $this
      ->getCommunities($force),
    'workflow' => $this
      ->getWorkflows($force),
    'filter' => $this
      ->getFilters($force),
  ];
  return $resources;
}