Show
Ignore:
Timestamp:
04/03/06 16:27:26 (6 years ago)
Author:
haas
Message:

docs, test trax_generator

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/action_view/helpers/active_record_helper.php

    r152 r195  
    2727 *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
    2828 *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
    29  */ 
    30  
    31 /** 
    3229 * 
    3330 *  @package PHPonTrax 
     31 */ 
     32 
     33/** 
     34 *  @todo Document this class 
    3435 */ 
    3536class ActiveRecordHelper extends Helpers { 
    3637     
     38    /** 
     39     * 
     40     */ 
    3741    public $scaffolding = 0; 
    3842 
     
    4246     *   input("post", "title") => 
    4347     *     <input id="post_title" name="post[title]" size="30" type="text" value="Hello World" /> 
     48     *  @uses to_tag() 
    4449     */ 
    4550    function input($object_name, $attribute_name, $options = array()) { 
     
    4853     
    4954    /** 
    50      * 
     55     *  @todo Document this method 
     56     *  @uses to_scaffold_tag() 
    5157     */ 
    5258    function input_scaffolding($object_name, $attribute_name, $options = array()) { 
     
    9096     *     collection_select("department", "id", $departments, "id", "name")) 
    9197     *   ) 
     98     *  @uses all_input_tags() 
     99     *  @uses content_tag() 
    92100     */ 
    93101    function form($record_name, $options = array()) { 
     
    117125     *   <?= error_message_on "post", "title", "Title simply ", " (or it won't work)", "inputError" ?> => 
    118126     *     <div class="inputError">Title simply can't be empty (or it won't work)</div> 
     127     *  @uses attribute_name 
     128     *  @uses controller_object 
     129     *  @uses content_tag() 
     130     *  @uses object_name 
    119131     */ 
    120132    function error_message_on($object_name, $attribute_name, $prepend_text = "", $append_text = "", $css_class = "formError") { 
     
    158170 
    159171    /** 
    160      * 
     172     *  @todo Document this method 
    161173     */ 
    162174    function all_input_tags($record, $record_name, $options) { 
     
    178190 
    179191    /** 
    180      * 
     192     *  @todo Document this method 
     193     *  @uses scaffolding 
    181194     */ 
    182195    function default_input_block() { 
     
    189202     
    190203    /** 
    191      * 
     204     *  @todo Document this method 
    192205     */ 
    193206    function to_tag($object_name, $attribute_name, $options = array()) { 
     
    231244 
    232245    /** 
    233      * 
     246     *  @todo Document this method 
    234247     */ 
    235248    function to_scaffold_tag($object_name, $attribute_name, $options = array()) { 
     
    263276                $results = "boolean_select(\"$object_name\", \"$attribute_name\")"; 
    264277                break; 
     278    default: 
     279      echo "default case from ".$this->column_type()."\n"; 
    265280        } 
    266281        if(count($this->object()->errors)) { 
     
    271286 
    272287    /** 
    273      * 
     288     *  @todo Document this method 
    274289     */ 
    275290    function tag_without_error_wrapping() { 
     
    279294 
    280295    /** 
    281      * 
     296     *  @todo Document this method 
    282297     */ 
    283298    function tag($name, $options = array()) { 
     
    290305 
    291306    /** 
    292      * 
     307     *  @todo Document this method 
    293308     */ 
    294309    function content_tag_without_error_wrapping() { 
     
    298313 
    299314    /** 
    300      * 
     315     *  @todo Document this method 
    301316     */ 
    302317    function content_tag($name, $value, $options = array()) { 
     
    309324 
    310325    /** 
    311      * 
     326     *  @todo Document this method 
    312327     */ 
    313328    function to_date_select_tag_without_error_wrapping() { 
     
    318333 
    319334    /** 
    320      * 
     335     *  @todo Document this method 
    321336     */ 
    322337    function to_date_select_tag($options = array()) { 
     
    329344 
    330345    /** 
    331      * 
     346     *  @todo Document this method 
    332347     */ 
    333348    function to_datetime_select_tag_without_error_wrapping() { 
     
    338353 
    339354    /** 
    340      * 
     355     *  @todo Document this method 
    341356     */ 
    342357    function to_datetime_select_tag($options = array()) { 
     
    349364 
    350365    /** 
    351      * 
     366     *  @todo Document this method 
    352367     */ 
    353368    function error_wrapping($html_tag, $has_error) { 
     
    356371 
    357372    /** 
    358      * 
     373     *  @todo Document this method 
    359374     */ 
    360375    function error_message() { 
     
    363378 
    364379    /** 
    365      * 
     380     *  @todo Document this method 
    366381     */ 
    367382    function column_type() { 
     
    421436} 
    422437 
     438// -- set Emacs parameters -- 
     439// Local variables: 
     440// tab-width: 4 
     441// c-basic-offset: 4 
     442// c-hanging-comment-ender-p: nil 
     443// indent-tabs-mode: nil 
     444// End: 
    423445?>