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