Exemple #1
0
 /**
  * Save imported products links.
  *
  * @param \app\models\glabs\objects\BaseObject $object Object.
  *
  * @return bool
  *
  * @throws InvalidParamException
  */
 public static function saveProductsLinks($object)
 {
     if (!$object->getUploadedLink()) {
         return false;
     }
     $fp = fopen(Yii::getAlias('@runtime/products_' . (int) self::$startTime . '.csv'), 'a');
     fputcsv($fp, [$object->getUrl(), $object->getUploadedLink()]);
     fclose($fp);
     return true;
 }