MV framework logo
  • Architecture
  • Philosophy
  • Admin panel
  • Support
  • Feedback
Documentation
Download .zip version 3.2.0 from 25.12.2024
  • Architecture
  • Philosophy
  • Admin panel
  • Support
  • Feedback
Getting started
  • Installation and launch
  • Folder structure
  • Launching a simple website
  • Pre-installed models
  • SQLite getting started
  • System settings
  • Migrations
  • Debugging
Models
  • General principles of models
  • Data types
    • General characteristics
    • Boolean
    • String char
    • Numeric: int, float, order
    • Special string: url, redirect, email, phone
    • Password
    • Text
    • Date and time
    • File and image
    • Array of images
    • Choice enum
    • Parent
    • Many to one
    • Many to many
    • Group
  • Model setup
  • Simple models
  • Foreign keys
  • Trees
  • Many to many
  • Group
  • Records management
  • Managing simple models
  • Additional features
Templates and routing
  • General principles of templates
  • Router object
  • MV object
  • Create a new template
  • Output of data in template
  • Record object
  • Files and images
  • Date and time
  • Redirects and http
  • Sending email
  • Special methods
Forms
  • Creating forms
  • Setting up form fields
  • Validating form fields
  • Form security
  • Working with form data
  • Using data from models
  • Form methods
SQL queries
  • Query builder
  • Direct queries
  • Pagination
  • Sorting
  • Filtration
Additional
  • AJAX
  • Plugins
  • Caching
  • Security
  • Admin panel add-ons
Documentation
Getting started
  • Installation and launch
  • Folder structure
  • Launching a simple website
  • Pre-installed models
  • SQLite getting started
  • System settings
  • Migrations
  • Debugging
Models
  • General principles of models
  • Data types
    • General characteristics
    • Boolean
    • String char
    • Numeric: int, float, order
    • Special string: url, redirect, email, phone
    • Password
    • Text
    • Date and time
    • File and image
    • Array of images
    • Choice enum
    • Parent
    • Many to one
    • Many to many
    • Group
  • Model setup
  • Simple models
  • Foreign keys
  • Trees
  • Many to many
  • Group
  • Records management
  • Managing simple models
  • Additional features
Templates and routing
  • General principles of templates
  • Router object
  • MV object
  • Create a new template
  • Output of data in template
  • Record object
  • Files and images
  • Date and time
  • Redirects and http
  • Sending email
  • Special methods
Forms
  • Creating forms
  • Setting up form fields
  • Validating form fields
  • Form security
  • Working with form data
  • Using data from models
  • Form methods
SQL queries
  • Query builder
  • Direct queries
  • Pagination
  • Sorting
  • Filtration
Additional
  • AJAX
  • Plugins
  • Caching
  • Security
  • Admin panel add-ons
MV tracker

Numeric: int, float, order

These types are divided into:

  • int - integer
  • float - real
  • order - integer position number

Purpose: working with numeric data, the order type is used to change the serial number of a record in the general list and when displayed in the administrative part has its own appearance with arrows that allow you to change its location in the list.
Field type in the SQL table: int and float, respectively.

Additional parameters:

positive
Purpose: allows only positive values ​​for this field 
Possible values: true, false
Default: false

zero_allowed
Purpose: allows zero values ​​for this field 
Possible values: true, false
Default: true

Position in list: order

To manage the sequence number of an element in the general list, there is a special data type order. Initially, this is an integer field for entering values ​​of the following type: 1, 2, 5, 14. For a field with the order type in the general table of records, arrows appear in the administrative panel for moving the element relative to others in the list. Also, when creating a new record in the admin panel, the next serial number in the list is substituted into this field.

SQL selection from the table is often ordered by this field (ORDER BY `field`). It is used for pages, products, articles and many other modules where there is ordering of records when displayed on the site.

Field type in the SQL table: int

depend_on_enum
Purpose: blocks the ability to move records when clicking on the arrows in the model table in the admin panel. The blocking is removed when a filter is launched on the specified field. Blocking is needed in cases where it is logical to change the sequence numbers only when setting the required filter. 
Possible values: name of enum-type fields in the current model, for example supplier, brand
Default: false

Examples:

['Price', 'int', 'price']

['Weight', 'float', 'weight', ['required' => true]]

['Quantity', 'int', 'number', ['zero_allowed' => false, 'positive' => true]]

['Position', 'order', 'order']

Previous section

String char

Next section

Special string: url, redirect, email, phone
MV workshop banner
MV tracker

© 2014-2025, MV framework team

MV tracker project Github