Пример #1
0
 /**
  * Validate slug
  *
  * @param $value
  * @param array $context
  * @return boolean
  */
 public function validateSlug($value, array $context = [])
 {
     return $this->model->isSlugFree($value, $this->newsId);
 }
Пример #2
0
 /**
  * Validate a category name
  *
  * @param $value
  * @param array $context
  * @return boolean
  */
 public function validateCategoryName($value, array $context = [])
 {
     return $this->model->isCategoryFree($value, $this->categoryId);
 }