@@ 102-115 (lines=14) @@ | ||
99 | return $this->formatName('content', $name); |
|
100 | } |
|
101 | ||
102 | private function formatName($role, $name) |
|
103 | { |
|
104 | $prefix = $this->namespaceRegistry->getPrefix($role); |
|
105 | ||
106 | if (!$prefix) { |
|
107 | return $name; |
|
108 | } |
|
109 | ||
110 | return sprintf( |
|
111 | '%s:%s', |
|
112 | $prefix, |
|
113 | $name |
|
114 | ); |
|
115 | } |
|
116 | ||
117 | private function formatLocalizedName($role, $name, $locale) |
|
118 | { |
|
@@ 117-131 (lines=15) @@ | ||
114 | ); |
|
115 | } |
|
116 | ||
117 | private function formatLocalizedName($role, $name, $locale) |
|
118 | { |
|
119 | $prefix = $this->namespaceRegistry->getPrefix($role); |
|
120 | ||
121 | if (!$prefix) { |
|
122 | return sprintf('%s-%s', $locale, $name); |
|
123 | } |
|
124 | ||
125 | return sprintf( |
|
126 | '%s:%s-%s', |
|
127 | $prefix, |
|
128 | $locale, |
|
129 | $name |
|
130 | ); |
|
131 | } |
|
132 | } |
|
133 |