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

Parent

Purpose: allows you to create descendants for records, thereby organizing a tree.
Field type in SQL table: int

Additional parameters:

name_field
Purpose: when displaying a list of possible model values, a field named 'name' is searched for; if this field is missing, then you must specify the field that will be used as a named field
Possible values: field name, for example 'first_name', 'label', 'date'
Default: 'name'

max_depth
Purpose: maximum nesting depth, number of possible tree sublevels
Possible values: positive integer
Default: null

parent_for
Purpose: organizes a connection with another model based on the catalog principle -> catalog -> catalog -> product. The current model has nested subsections that may contain records from another model.

The use of this type is described in more detail in the Trees section.

Possible values: model name, e.g. 'Products', 'Topics'
Default: null

show_parent
Purpose: additionally shows the parent name for the field values 
Possible values: true, false
Default: false

Examples:

['Parent section', 'parent', 'parent']

['Section', 'parent', 'section', ['name_field' => 'title']]

['Catalog', 'parent', 'catalog', ['parent_for' => 'Products',
                                  'max_depth' => 3,
                                  'show_parent' => true]]

Previous section

Choice enum

Next section

Many to one
MV workshop banner
MV tracker

© 2014-2025, MV framework team

MV tracker project Github