form acc work edit: save action

This commit is contained in:
2021-06-25 00:05:27 +02:00
parent 981b9299ad
commit 0afe277b04
10 changed files with 220 additions and 39 deletions

View File

@@ -33,17 +33,18 @@ class SocialActionRender implements ChillEntityRenderInterface
{
/** @var $socialAction SocialAction */
$options = \array_merge(self::DEFAULT_ARGS, $options);
$str = $this->translatableStringHelper->localize($socialAction->getTitle());
$titles[] = $this->translatableStringHelper->localize($socialAction->getTitle());
while ($socialAction->hasParent()) {
$socialAction = $socialAction->getParent();
$str .= $options[self::SEPARATOR_KEY].$this->translatableStringHelper->localize(
$titles[] = $this->translatableStringHelper->localize(
$socialAction->getTitle()
);
}
return $str;
$titles = \array_reverse($titles);
return \implode($options[self::SEPARATOR_KEY], $titles);
}
protected function buildParents($socialAction): array

View File

@@ -38,16 +38,20 @@ final class SocialIssueRender implements ChillEntityRenderInterface
/** @var $socialIssue SocialIssue */
$options = array_merge(self::DEFAULT_ARGS, $options);
$str = $this->translatableStringHelper->localize($socialIssue->getTitle());
$titles[] = $this->translatableStringHelper
->localize($socialIssue->getTitle());
// loop to parent, until root
while ($socialIssue->hasParent()) {
$socialIssue = $socialIssue->getParent();
$str .= $options[self::SEPARATOR_KEY].$this->translatableStringHelper->localize(
$titles[] = $this->translatableStringHelper->localize(
$socialIssue->getTitle()
);
}
return $str;
$titles = \array_reverse($titles);
return \implode($options[self::SEPARATOR_KEY], $titles);
}
protected function buildParents(SocialIssue $socialIssue): array