@@ 400-407 (lines=8) @@ | ||
397 | { |
|
398 | $locale = $locale ?: $this->getFallbackLocale(); |
|
399 | ||
400 | foreach ($this->translations as $translation) { |
|
401 | $translation->setRelation('parent', $this); |
|
402 | ||
403 | if ($translation->getAttribute($this->getLocaleKey()) == $locale) { |
|
404 | return true; |
|
405 | } |
|
406 | } |
|
407 | ||
408 | return false; |
|
409 | } |
|
410 | ||
@@ 650-657 (lines=8) @@ | ||
647 | ||
648 | private function getTranslationByLocaleKey($key) |
|
649 | { |
|
650 | foreach ($this->translations as $translation) { |
|
651 | $translation->setRelation('parent', $this); |
|
652 | ||
653 | if ($translation->getAttribute($this->getLocaleKey()) == $key) { |
|
654 | return $translation; |
|
655 | } |
|
656 | } |
|
657 | ||
658 | return null; |
|
659 | } |
|
660 |