Пример #1
0
 /**
  * @param string $attribute
  */
 public function categoryIsExist($attribute)
 {
     $thumbsCategoryManager = new ThumbsCategoryManager();
     $category = $thumbsCategoryManager->getCategoryByName($this->{$attribute});
     if (!is_null($category)) {
         $this->addError('thumbsCategoryId', 'Thumbs category by name "' . $this->{$attribute} . '" already exist');
     }
 }