Ejemplo n.º 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');
     }
 }
Ejemplo n.º 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');
     }
 }
Ejemplo n.º 3
0
 /**
  * @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);
 }