[ Index ]
 

Code source de PHPonTrax 2.6.6-svn

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/vendor/trax/action_view/helpers/ -> url_helper.php (sommaire)

File containing the UrlHelper class and support functions (PHP 5)

Copyright: (c) 2005 John Peterson
Version: $Id: url_helper.php 240 2006-08-02 09:21:48Z john $
Poids: 354 lignes (13 kb)
Inclus ou requis: 1 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

UrlHelper:: (10 méthodes):
  link_to()
  convert_confirm_option_to_javascript()
  convert_boolean_attributes()
  button_to()
  link_image_to()
  url_for()
  link_to()
  link_image_to()
  button_to()
  url_for()


Classe: UrlHelper  - X-Ref


link_to($name, $options = array()   X-Ref
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?"))
return: string

convert_confirm_option_to_javascript($html_options)   X-Ref

param: string[] Options
return: string

convert_boolean_attributes(&$html_options, $bool_attrs)   X-Ref

param: mixed[]
param: mixed[]
return: mixed[]

button_to($name, $options = array()   X-Ref

param: string
param: mixed[]
param: mixed[]
return: string

link_image_to($src, $options = array()   X-Ref
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")


url_for($options = array()   X-Ref
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
<samp>TRAX_URL_PREFIX</samp> 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
<samp>':id'</samp> option will be ignored if the <samp>':action'</samp>
option is omitted.
param: mixed[]
return: string

link_to($name, $options = array()   X-Ref
Make a new UrlHelper object and call its link_to() method


link_image_to($src, $options = array()   X-Ref
Make a new UrlHelper object and call its link_image_to() method


button_to($name, $options = array()   X-Ref
Make a new UrlHelper object and call its button_to() method


url_for($options = array()   X-Ref
Make a new UrlHelper object and call its url_for() method




Généré le : Sun Feb 25 20:04:38 2007 par Balluche grâce à PHPXref 0.7