| @@ 73-83 (lines=11) @@ | ||
| 70 | } |
|
| 71 | } |
|
| 72 | ||
| 73 | public function validation() |
|
| 74 | { |
|
| 75 | $validator = new Validation(); |
|
| 76 | $validator->add('slug', new UniquenessValidator( |
|
| 77 | [ |
|
| 78 | "model" => $this, |
|
| 79 | "message" => $this->getDi()->get('helper')->translate("Page with slug is already exists") |
|
| 80 | ] |
|
| 81 | )); |
|
| 82 | return $this->validate($validator); |
|
| 83 | } |
|
| 84 | ||
| 85 | public static function findCachedBySlug($slug) |
|
| 86 | { |
|
| @@ 77-87 (lines=11) @@ | ||
| 74 | ]); |
|
| 75 | } |
|
| 76 | ||
| 77 | public function validation() |
|
| 78 | { |
|
| 79 | $validator = new Validation(); |
|
| 80 | $validator->add('slug', new UniquenessValidator( |
|
| 81 | [ |
|
| 82 | "model" => $this, |
|
| 83 | "message" => $this->getDi()->get('helper')->translate("Publishcation with slug is already exists") |
|
| 84 | ] |
|
| 85 | )); |
|
| 86 | return $this->validate($validator); |
|
| 87 | } |
|
| 88 | ||
| 89 | public function afterValidation() |
|
| 90 | { |
|