Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

ProductPriceUploadForm.php 613B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace backend\forms;
  3. use yii\base\Model;
  4. use yii\web\UploadedFile;
  5. /**
  6. * UploadForm is the model behind the upload form.
  7. */
  8. class ProductPriceUploadForm extends Model
  9. {
  10. /**
  11. * @var UploadedFile file attribute
  12. */
  13. public $file;
  14. /**
  15. * @return array the validation rules.
  16. */
  17. public function rules()
  18. {
  19. return [
  20. [['file'], 'file', 'skipOnEmpty' => false, 'mimeTypes' => 'text/csv, text/plain'],
  21. ];
  22. }
  23. public function attributeLabels()
  24. {
  25. return [
  26. 'file' => "Fichier d'import (CSV)"
  27. ];
  28. }
  29. }
  30. ?>