Skip to content

Conversation

@josegonzalez
Copy link
Member

The pattern {field-value:(\w+)} is replaced by value contained in the current entity in the specified field. As an example, if your path has {field-value:unique_id} and the entity being saved has a value of 4b3403665fea6 for the field unique_id, then {field-value:unique_id} will be replaced with 4b3403665fea6. This replacement can be used multiple times for one or more fields.

If the value is not a string or zero-length, a LogicException will be thrown.

The pattern `{field-value:(\w+)}` is replaced by value contained in the current entity in the specified field. As an example, if your path has `{field-value:unique_id}` and the entity being saved has a value of `4b3403665fea6` for the field `unique_id`, then `{field-value:unique_id}` will be replaced with `4b3403665fea6`. This replacement can be used multiple times for one or more fields.

If the value is not a string or zero-length, a LogicException will be thrown.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 72cb7af on field-value-replacement into 389a36e on master.

@josegonzalez josegonzalez merged commit aee88b0 into master Jul 23, 2016
@josegonzalez josegonzalez deleted the field-value-replacement branch July 23, 2016 08:28
$value = $this->entity->get($field);
if ($value === null) {
throw new LogicException(sprintf('Field value for substitution is missing: %s', $field));
}if (!is_scalar($value)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CS error, ignore if fixed later :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants