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

Class: UrlHelper

Source Location: /vendor/trax/action_view/helpers/url_helper.php

Class Overview

Helpers
   |
   --UrlHelper



Author(s):

Methods


Inherited Variables

Inherited Methods

Class: Helpers

Helpers::__construct()
Construct a Helpers object
Helpers::boolean_attribute()
Convert an attribute to proper XML boolean form
Helpers::cdata_section()
Wrap CDATA begin and end tags around argument
Helpers::content_tag()
Generate an open/close pair of tags with optional attributes and content between
Helpers::convert_options()
Convert selected attributes to proper XML boolean form
Helpers::object()
Given the name of an ActiveRecord subclass, find an instance
Helpers::tag()
Generate an HTML or XML tag with optional attributes and self-ending
Helpers::tag_options()
Convert array of tag attribute names and values to string
Helpers::to_content_tag()
Helpers::value()
Get value of current attribute in the current ActiveRecord object

Class Details

[line 34]


Tags:

todo:  Document this class


[ Top ]


Class Methods


method button_to [line 127]

string button_to( string $name, [mixed[] $options = array()], [mixed[] $html_options = null])



Tags:



Parameters:

string   $name  
mixed[]   $options  
mixed[]   $html_options  

[ Top ]

method convert_boolean_attributes [line 108]

mixed[] convert_boolean_attributes( mixed[] &$html_options, mixed[] $bool_attrs)



Tags:

usedby:  UrlHelper::button_to()
todo:  Document this method


Parameters:

mixed[]   &$html_options  
mixed[]   $bool_attrs  

[ Top ]

method convert_confirm_option_to_javascript [line 93]

string convert_confirm_option_to_javascript( string[] $html_options)



Tags:

usedby:  UrlHelper::button_to()
usedby:  UrlHelper::link_to()
todo:  Document this method


Parameters:

string[]   $html_options   Options

[ Top ]

method link_image_to [line 153]

void link_image_to( mixed $src, [mixed $options = array()], [mixed $html_options = array()])

This tag is deprecated. Combine the link_to and

AssetTagHelper::image_tag yourself instead, like: link_to(image_tag("rss", array("size" => "30x45"), array("border" => 0)), "http://www.example.com")




Tags:

usedby:  link_image_to()
todo:  Document this method


[ Top ]

method link_to [line 58]

string link_to( mixed $name, [mixed $options = array()], [mixed $html_options = array()])

Creates a link tag of the given +name+ using an URL created by the set of +options+.

It's also possible to pass a string instead of an options hash to get a link tag that just points without consideration. If null is passed as a name, the link itself will become the name. The $html_options have a special feature for creating javascript confirm alerts where if you pass ":confirm" => 'Are you sure?', the link will be guarded with a JS popup asking that question. If the user accepts, the link is processed, otherwise not.

Example: link_to("Delete this page", array(":action" => "delete", ":id" => $page->id), array(":confirm" => "Are you sure?"))




Tags:



[ Top ]

method url_for [line 210]

string url_for( [mixed[] $options = array()])

Generate URL based on current URL and optional arguments

Output a URL with controller and optional action and id. The output URL has the same method, host and TRAX_URL_PREFIX as the current URL. Controller is either the current controller or a controller specified in $options. Action and ID are optionally specified in $options, or omitted. The ':id' option will be ignored if the ':action' option is omitted.




Tags:



Parameters:

mixed[]   $options  
  • string:
    The string value is returned immediately with no substitutions.
  • array:
    • ':controller'=>controller value
    • ':action'=>action value
    • ':id'=>id value

[ Top ]


Documentation generated on Thu, 04 May 2006 19:48:05 -0600 by phpDocumentor 1.3.0RC4