Drupal investigation

TestBooks.php 758B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace app\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "testBooks".
  6. *
  7. * @property integer $id
  8. * @property string $title
  9. * @property string $author
  10. */
  11. class TestBooks extends \yii\db\ActiveRecord
  12. {
  13. /**
  14. * @inheritdoc
  15. */
  16. public static function tableName()
  17. {
  18. return 'testBooks';
  19. }
  20. /**
  21. * @inheritdoc
  22. */
  23. public function rules()
  24. {
  25. return [
  26. [['title', 'author'], 'string', 'max' => 100],
  27. ];
  28. }
  29. /**
  30. * @inheritdoc
  31. */
  32. public function attributeLabels()
  33. {
  34. return [
  35. 'id' => Yii::t('app', 'ID'),
  36. 'title' => Yii::t('app', 'Title'),
  37. 'author' => Yii::t('app', 'Author'),
  38. ];
  39. }
  40. }