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

Text

Purpose: multiline text, html markup 
Field type in SQL table: longtext

Additional parameters:

rich_text
Purpose: adding a visual editor for html formatting of content, using the CKEditor
editor Possible values: true, false
Default: false

height
Purpose: height of the text area or visual editor (when the rich_text option is enabled), in pixels 
Possible values: integer, positive, non-zero 
Default: 100 (for a regular text area and 200 for a visual editor)

show_in_admin
Purpose: by default, text fields are not displayed in the administrative interface in the records table due to their large length. If you want to enable the display of this field in the list, you must set this parameter to an integer. This number will be the maximum length of the string, and the rest will be truncated.
Possible values: integer, positive, non-zero
Default: false

display_method
Purpose: allows you to override the method for generating HTML code in the administrative panel for this field, the method must be defined in the current model, the value of the database cell will be passed as an input argument 
Possible values: strings like 'nameOfMethod'
Default: null

virtual
Purpose: allows you to create virtual fields in the model without a column in the database. Usually combined with the display_method option. Migrations do not offer to create a column for a virtual field. Also, such a field does not participate in the operation of creating or updating a record in the model. It only displays data in the right place in the admin panel
Possible values: true, false
Default: false

Examples:

['Comment', 'text', 'comment']

['Article Content', 'text', 'content', ['rich_text' => true]]

['Product Description', 'text', 'item_description', ['rich_text' => true,
                                                     'height' => 400,
                                                     'show_in_admin' => 70]]

['Order Contents', 'text', 'order_products', ['display_method' => 'displayOrder']]

['Special Field', 'text', 'special_field', ['display_method' => 'displaySpesialField',
                                            'virtual' => true])

//Method to display field
class Orders extends Model
{
    ...
    
    public function displayOrder($value)
    {
        $html = ...

        //Processing $value

        return $html;
    }
}

Previous section

Password

Next section

Date and time
MV workshop banner
MV tracker

© 2014-2025, MV framework team

MV tracker project Github