TaniPHP
[ class tree: TaniPHP ] [ index: TaniPHP ] [ all elements ]

Class: TimeField

Source Location: /fields.php

Class Overview

Field
   |
   --TimeField

Creates a composite field for time selection.


Author(s):

  • Dumitru Postoronca

Methods


Inherited Variables

Inherited Methods

Class: Field

Field::getHtml()
Renders the object in HTML code
Field::out()
Outputs the field in XHTML format

Class Details

[line 556]
Creates a composite field for time selection.

Creates a composite field for time selection. Note that the $input attribute is an array of fields (hour, minute & second). Example:

  1. $time = new TimeField('start_time');
  2. $time->out();




Tags:

author:  Dumitru Postoronca


[ Top ]


Class Methods


constructor TimeField [line 565]

TimeField TimeField( string $name, [string $label = 'Time: '])

Constructor

Constructor




Parameters:

string   $name   Name of the field
string   $label   Label of the field

[ Top ]

method out [line 604]

void out( )

Outputs the field in XHTML format

Outputs the field in XHTML format




Overrides Field::out() (Outputs the field in XHTML format)

[ Top ]

method setTime [line 592]

void setTime( mixed $time, array $date)

Sets the field's time.

Sets the field's time. Example of usage using a mySQL database:

  1. $time = explode(":", $model->start_time);
  2. $timeField->setDate($time);




Parameters:

array   $date   Array that represents a date element. $date[0] represents the hour, $date[1] is the minute and $date[2] is the second you wish to set

[ Top ]


Documentation generated on Fri, 16 Dec 2005 13:16:39 +0200 by phpDocumentor 1.3.0RC4