SettingFormModel.php 890 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. echo "<?php\n";
  3. ?>
  4. namespace addons\<?= $model->name;?>\common\forms;
  5. use yii\base\Model;
  6. /**
  7. * Class SettingForm
  8. * @package addons\<?= $model->name;?>\common\forms
  9. */
  10. class SettingForm extends Model
  11. {
  12. public $share_title;
  13. public $share_cover;
  14. public $share_desc;
  15. public $share_link;
  16. /**
  17. * {@inheritdoc}
  18. */
  19. public function rules()
  20. {
  21. return [
  22. [['share_title', 'share_cover'], 'string', 'max' => 100],
  23. [['share_link', 'share_desc'], 'string', 'max' => 255],
  24. [['share_link'], 'url'],
  25. ];
  26. }
  27. /**
  28. * @return array
  29. */
  30. public function attributeLabels()
  31. {
  32. return [
  33. 'share_title' => '分享标题',
  34. 'share_cover' => '分享封面',
  35. 'share_desc' => '分享描述',
  36. 'share_link' => '分享链接',
  37. ];
  38. }
  39. }
粤ICP备19079148号