Form_Button_Model Class Reference

Represents a form button. More...

Inheritance diagram for Form_Button_Model:
Form_Button_Cancel_Model Form_Button_Confirm_Model

Public Member Functions

 get_name ()
 Get the field name.
 get_pretty_name ()
 Get the name as it should be visisble in the UI.
 get_type ()
 Get the view of this field, relative to form/ directory in the views folder.

Protected Member Functions

 __construct ($name, $pretty_name)
 Initialize the name and pretty name for the field.

Detailed Description

Represents a form button.


Constructor & Destructor Documentation

Form_Button_Model::__construct ( name,
pretty_name 
) [protected]

Initialize the name and pretty name for the field.

There is (almost) no fields that shouldn't take options. Thus (almost) all field types needs to override this method. Thus not overriding this methods is (most likely) an error. And those can do it anyway. Thus protected.

Parameters:
$name string
$pretty_name string

Reimplemented in Form_Button_Cancel_Model, and Form_Button_Confirm_Model.


Member Function Documentation

Form_Button_Model::get_name (  ) 

Get the field name.

This maps to the field name both in processed and unprocessed data

Returns:
string
Form_Button_Model::get_pretty_name (  ) 

Get the name as it should be visisble in the UI.

Can be null for some fields.

Returns:
string
Form_Button_Model::get_type (  )  [abstract]

Get the view of this field, relative to form/ directory in the views folder.

It should be possible to do "skins" for forms by adding a subdirectory in the form/ folder, which should re-implement the views.

Returns:
string

Reimplemented in Form_Button_Cancel_Model, and Form_Button_Confirm_Model.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 19 Dec 2018 for ninja by  doxygen 1.6.1