Example #1
0
 /**
  * @param string $attribute
  */
 public function categoryIsExist($attribute)
 {
     $thumbsCategoryManager = new ThumbsCategoryManager();
     if (!$thumbsCategoryManager->isExist($this->{$attribute})) {
         $this->addError('thumbsCategoryId', 'Thumbs category by ID "' . $this->{$attribute} . '" not found');
     }
 }
Example #2
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');
     }
 }
 /**
  * @param integer $fileInformationId
  * @param integer $thumbsCategoryId
  */
 private function _createRoundSaveThumbs($fileInformationId, $thumbsCategoryId, $extraData)
 {
     $thumbsCategoryManager = new ThumbsCategoryManager();
     if (is_null($thumbsCategoryId) || !$thumbsCategoryManager->isExist($thumbsCategoryId)) {
         return;
     }
     $roundSaveThumbsManager = new RoundSaveThumbManager();
     $roundSaveThumbsManager->add($fileInformationId, $thumbsCategoryId, $extraData);
 }