| @@ 136-147 (lines=12) @@ | ||
| 133 | * |
|
| 134 | * @return \Charcoal\Translator\Translation|null |
|
| 135 | */ |
|
| 136 | public function slugPrefix() |
|
| 137 | { |
|
| 138 | if (!$this->slugPrefix) { |
|
| 139 | $metadata = $this->metadata(); |
|
| 140 | ||
| 141 | if (isset($metadata['routable']['prefix'])) { |
|
| 142 | $this->slugPrefix = $this->translator()->translation($metadata['routable']['prefix']); |
|
| 143 | } |
|
| 144 | } |
|
| 145 | ||
| 146 | return $this->slugPrefix; |
|
| 147 | } |
|
| 148 | ||
| 149 | /** |
|
| 150 | * Retrieve route suffix for the object's URL slug pattern. |
|
| @@ 154-165 (lines=12) @@ | ||
| 151 | * |
|
| 152 | * @return \Charcoal\Translator\Translation|null |
|
| 153 | */ |
|
| 154 | public function slugSuffix() |
|
| 155 | { |
|
| 156 | if (!$this->slugSuffix) { |
|
| 157 | $metadata = $this->metadata(); |
|
| 158 | ||
| 159 | if (isset($metadata['routable']['suffix'])) { |
|
| 160 | $this->slugSuffix = $this->translator()->translation($metadata['routable']['suffix']); |
|
| 161 | } |
|
| 162 | } |
|
| 163 | ||
| 164 | return $this->slugSuffix; |
|
| 165 | } |
|
| 166 | ||
| 167 | /** |
|
| 168 | * Determine if the slug is editable. |
|