function StringStorageInterface::getStrings

Same name in other branches
  1. 9 core/modules/locale/src/StringStorageInterface.php \Drupal\locale\StringStorageInterface::getStrings()
  2. 8.9.x core/modules/locale/src/StringStorageInterface.php \Drupal\locale\StringStorageInterface::getStrings()
  3. 10 core/modules/locale/src/StringStorageInterface.php \Drupal\locale\StringStorageInterface::getStrings()

Loads multiple source string objects.

Parameters

array $conditions: (optional) Array with conditions that will be used to filter the strings returned and may include any of the following elements:

  • Any simple field value indexed by field name.
  • 'translated', TRUE to get only translated strings or FALSE to get only untranslated strings. If not set it returns both translated and untranslated strings that fit the other conditions.

Defaults to no conditions which means that it will load all strings.

array $options: (optional) An associative array of additional options. It may contain any of the following optional keys:

  • 'filters': Array of string filters indexed by field name.
  • 'pager limit': Use pager and set this limit value.

Return value

array Array of \Drupal\locale\StringInterface objects matching the conditions.

File

core/modules/locale/src/StringStorageInterface.php, line 30

Class

StringStorageInterface
Defines the locale string storage interface.

Namespace

Drupal\locale

Code

public function getStrings(array $conditions = [], array $options = []);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.