◆ addFieldValue()
Drupal\tripal\Services\TripalTokenParser::addFieldValue |
( |
|
$field_name, |
|
|
string |
$key, |
|
|
|
$value |
|
) |
| |
Adds the field values that should be used for replacement.
- Parameters
-
string | $field_name | The name of the field that the value belongs to |
StoragePropertyValue | $value | The property values |
◆ getBunde()
Drupal\tripal\Services\TripalTokenParser::getBunde |
( |
| ) |
|
Returns bundle object given to the parser.
- Returns
- \Drupal\tripal\Entity\TripalEntityType
◆ getEntity()
Drupal\tripal\Services\TripalTokenParser::getEntity |
( |
| ) |
|
Returns the entity given to the parser.
- Returns
- \Drupal\tripal\Entity\TripalEntity
◆ getFieldNames()
Drupal\tripal\Services\TripalTokenParser::getFieldNames |
( |
| ) |
|
Returns the names of the fields that have been added.
- Returns
- array
◆ getValues()
Drupal\tripal\Services\TripalTokenParser::getValues |
( |
| ) |
|
Returns the array of values given to the parser.
- Returns
- array
◆ replaceTokens()
Drupal\tripal\Services\TripalTokenParser::replaceTokens |
( |
array |
$tokenized_strings | ) |
|
Replaces the tokens with field values within the provided strings.
- Parameters
-
array | $tokenized_strings | Ann array of strings with field names as tokens. Field name should be surrounded by square brackets. |
- Returns
- array An array with all of the strings from the input $tokenized_strings array but with field tokens replaced with approprivate values.
◆ setEntity()
Drupal\tripal\Services\TripalTokenParser::setEntity |
( |
TripalEntity |
$entity | ) |
|
◆ $bundle
Drupal tripal Entity TripalEntityType Drupal\tripal\Services\TripalTokenParser::$bundle = NULL |
|
protected |
◆ $fields
array Drupal\tripal\Services\TripalTokenParser::$fields = [] |
|
protected |
An array of field instances.
◆ $values
array Drupal\tripal\Services\TripalTokenParser::$values = [] |
|
protected |
An array of field values indexed first by field name then by property key.
The documentation for this class was generated from the following file:
- tripal/src/Services/TripalTokenParser.php