| @@ -82,8 +82,8 @@ | ||
| 82 | 82 | // query moudle entity id. | 
| 83 | 83 | $query = "key = 'slug' and value = '$curSLug'"; | 
| 84 | 84 | $modelName = \Phalcon\Text::camelize($module); | 
| 85 | -        $modelTranslateName = "{$modelName}Translate"; | |
| 86 | -        $translateModel = "{$modelName}\Model\Translate\\{$modelName}Translate"; | |
| 85 | +        $modelTranslateName = "{$modelName}translate"; | |
| 86 | +        $translateModel = "{$modelName}\Model\Translate\\{$modelName}translate"; | |
| 87 | 87 | $slugRecord = $translateModel::findFirst([$query]); | 
| 88 | 88 | // query all slug. | 
| 89 | 89 | $mlSlug = $translateModel::findFirst([ | 
| @@ -54,14 +54,14 @@ | ||
| 54 | 54 | |
| 55 | 55 | public function validation() | 
| 56 | 56 |      { | 
| 57 | - $validator = new Validation(); | |
| 58 | -      $validator->add('slug', new UniquenessValidator( | |
| 59 | - [ | |
| 60 | - "model" => $this, | |
| 61 | -              "message" => $this->getDi()->get('helper')->translate("Page with slug is already exists") | |
| 62 | - ] | |
| 63 | - )); | |
| 64 | - return $this->validate($validator); | |
| 57 | + $validator = new Validation(); | |
| 58 | +        $validator->add('slug', new UniquenessValidator( | |
| 59 | + [ | |
| 60 | + "model" => $this, | |
| 61 | +                "message" => $this->getDi()->get('helper')->translate("Page with slug is already exists") | |
| 62 | + ] | |
| 63 | + )); | |
| 64 | + return $this->validate($validator); | |
| 65 | 65 | } | 
| 66 | 66 | |
| 67 | 67 | public static function findCachedBySlug($slug) | 
| @@ -62,14 +62,14 @@ | ||
| 62 | 62 | |
| 63 | 63 | public function validation() | 
| 64 | 64 |      { | 
| 65 | - $validator = new Validation(); | |
| 66 | -      $validator->add('slug', new UniquenessValidator( | |
| 67 | - [ | |
| 68 | - "model" => $this, | |
| 69 | -              "message" => $this->getDi()->get('helper')->translate("Publishcation with slug is already exists") | |
| 70 | - ] | |
| 71 | - )); | |
| 72 | - return $this->validate($validator); | |
| 65 | + $validator = new Validation(); | |
| 66 | +        $validator->add('slug', new UniquenessValidator( | |
| 67 | + [ | |
| 68 | + "model" => $this, | |
| 69 | +                "message" => $this->getDi()->get('helper')->translate("Publishcation with slug is already exists") | |
| 70 | + ] | |
| 71 | + )); | |
| 72 | + return $this->validate($validator); | |
| 73 | 73 | } | 
| 74 | 74 | |
| 75 | 75 | public function afterValidation() |