PHP Class EventTypeModuleCode

Inheritance: extends BaseModuleCode
Exibir arquivo Open project: openeyes/openeyes Class Usage Examples

Public Properties

Property Type Description
$cssPath
$eventGroupName
$event_group
$event_type
$files_to_process
$form_errors
$imgPath
$jsPath
$mode
$moduleID
$moduleShortID
$moduleShortSuffix
$moduleSuffix
$moduleTemplateFile
$specialty
$template
$validation_rules
$validation_rules_path

Public Methods

Method Description
__construct ( )
changeAllInstancesOfString ( $path, $from, $to )
dump_field_unique_values ( $table, $field, $selected = false )
dump_field_unique_values_multi ( $table, $field, $selected = false )
dump_table_fields ( $table, $selected = false )
elementExists ( string $name ) : boolean validation check to determine if an element called $name already exists for the event type only performs check for updates.
elementShortNameExists ( $name ) checks if an element short name exists.
eventTypeProperties ( $event_type_id )
extraElementFieldWrangling_DropdownList ( $elements, $number, $field_number, $fields_value )
extraElementFieldWrangling_EyeDraw ( $elements, $number, $field_number, $fields_value )
extraElementFieldWrangling_MultiSelect ( $elements, $number, $field_number, $fields_value )
extraElementFieldWrangling_RadioButtons ( $elements, $number, $field_number, $fields_value )
extraElementFieldWrangling_TextareaWithDropdown ( $elements, $number, $field_number, $fields_value )
findModelClassForTable ( $table, $path = false )
generateKeyName ( $field, $elementName )
generateKeyNames ( $table, $keys )
getDBFieldSQLType ( $field )
getElementsFromPost ( )
getEventShortName ( $event_type ) * works out the short name for an event type - if the event was generated through this version of gii then it will use the moduleShortSuffix property on the class. Otherwise it uses the table names generated for the event elements.
getEyedrawSize ( $class )
getHTMLField ( $field, $mode ) the
getHTMLFieldView ( $field )
getTableForeignKeys ( $table )
handleModuleNameChange ( $current_class, $target_class )
handleViewChanges ( )
init ( )
initialise ( $properties = false )
prepare ( )
regExpFile ( $regExp, $dir )
renderMigrations ( $file, $migrationid )
rules ( )
shouldUpdateFile ( $model )
substitutePostValue ( $field, $element_num, $field_num )
updateFormView ( $view_path, $element, $mode )
updateModel ( $model_path, $element )
updateViewView ( $view_path, $element )
validateRule ( $field_type, $element_num, $field_num )
validate_form ( )

Method Details

__construct() public method

public __construct ( )

changeAllInstancesOfString() public method

public changeAllInstancesOfString ( $path, $from, $to )

dump_field_unique_values() public static method

public static dump_field_unique_values ( $table, $field, $selected = false )

dump_field_unique_values_multi() public static method

public static dump_field_unique_values_multi ( $table, $field, $selected = false )

dump_table_fields() public static method

public static dump_table_fields ( $table, $selected = false )

elementExists() public method

validation check to determine if an element called $name already exists for the event type only performs check for updates.
public elementExists ( string $name ) : boolean
$name string
return boolean

elementShortNameExists() public method

We use the short name to define table names, so here we check for the table being defined in the db based off the current event. Only works for updates.
public elementShortNameExists ( $name )

eventTypeProperties() public static method

public static eventTypeProperties ( $event_type_id )

extraElementFieldWrangling_DropdownList() public method

public extraElementFieldWrangling_DropdownList ( $elements, $number, $field_number, $fields_value )

extraElementFieldWrangling_EyeDraw() public method

public extraElementFieldWrangling_EyeDraw ( $elements, $number, $field_number, $fields_value )

extraElementFieldWrangling_MultiSelect() public method

public extraElementFieldWrangling_MultiSelect ( $elements, $number, $field_number, $fields_value )

extraElementFieldWrangling_RadioButtons() public method

public extraElementFieldWrangling_RadioButtons ( $elements, $number, $field_number, $fields_value )

extraElementFieldWrangling_TextareaWithDropdown() public method

public extraElementFieldWrangling_TextareaWithDropdown ( $elements, $number, $field_number, $fields_value )

findModelClassForTable() public static method

public static findModelClassForTable ( $table, $path = false )

generateKeyName() public method

public generateKeyName ( $field, $elementName )

generateKeyNames() public method

public generateKeyNames ( $table, $keys )

getDBFieldSQLType() public method

public getDBFieldSQLType ( $field )

getElementsFromPost() public method

public getElementsFromPost ( )

getEventShortName() public static method

assumes table names of the form et_[specialty_code][group_code][short_name]_[element_short_name] event needs to have had an element defined.
public static getEventShortName ( $event_type )

getEyedrawSize() public static method

public static getEyedrawSize ( $class )

getHTMLField() public method

the
public getHTMLField ( $field, $mode )

getHTMLFieldView() public method

public getHTMLFieldView ( $field )

getTableForeignKeys() public method

public getTableForeignKeys ( $table )

handleModuleNameChange() public method

public handleModuleNameChange ( $current_class, $target_class )

handleViewChanges() public method

public handleViewChanges ( )

init() public method

public init ( )

initialise() public method

public initialise ( $properties = false )

prepare() public method

public prepare ( )

regExpFile() public method

public regExpFile ( $regExp, $dir )

renderMigrations() public method

public renderMigrations ( $file, $migrationid )

rules() public method

public rules ( )

shouldUpdateFile() public method

public shouldUpdateFile ( $model )

substitutePostValue() public method

public substitutePostValue ( $field, $element_num, $field_num )

updateFormView() public method

public updateFormView ( $view_path, $element, $mode )

updateModel() public method

public updateModel ( $model_path, $element )

updateViewView() public method

public updateViewView ( $view_path, $element )

validateRule() public method

public validateRule ( $field_type, $element_num, $field_num )

validate_form() public method

public validate_form ( )

Property Details

$cssPath public_oe property

public $cssPath

$eventGroupName public_oe property

public $eventGroupName

$event_group public_oe property

public $event_group

$event_type public_oe property

public $event_type

$files_to_process public_oe property

public $files_to_process

$form_errors public_oe property

public $form_errors

$imgPath public_oe property

public $imgPath

$jsPath public_oe property

public $jsPath

$mode public_oe property

public $mode

$moduleID public_oe property

public $moduleID

$moduleShortID public_oe property

public $moduleShortID

$moduleShortSuffix public_oe property

public $moduleShortSuffix

$moduleSuffix public_oe property

public $moduleSuffix

$moduleTemplateFile public_oe property

public $moduleTemplateFile

$specialty public_oe property

public $specialty

$template public_oe property

public $template

$validation_rules public_oe property

public $validation_rules

$validation_rules_path public_oe property

public $validation_rules_path