PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.9
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.9
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / app / Models / Model.php

Model.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.9, at app/Models/Model.php

45 lines 1015 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\App\Models;
4
5 use DateTimeInterface;
6 use FluentForm\Framework\Database\Orm\Model as BaseModel;
7
8 class Model extends BaseModel
9 {
10 /**
11 * The attributes that aren't mass assignable.
12 *
13 * @var array
14 */
15 protected $guarded = ['id', 'ID'];
16
17 /**
18 * Serialize dates to Y-m-d H:i:s format for backward compatibility.
19 *
20 * The framework v2 defaults to ISO 8601 (e.g. 2026-03-03T08:54:40+00:00)
21 * but existing JS code expects the simple Y-m-d H:i:s format.
22 *
23 * @param DateTimeInterface $date
24 * @return string
25 */
26 protected function serializeDate(DateTimeInterface $date)
27 {
28 return $date->format('Y-m-d H:i:s');
29 }
30
31 /**
32 * Get the number of models to return per page.
33 *
34 * @return int
35 */
36 public function getPerPage()
37 {
38 $request = wpFluentForm('request');
39
40 return intval(
41 $request->get('per_page', $request->get('perPage', $this->perPage))
42 );
43 }
44 }
45