Skip to content

Commit

Permalink
Fixing doc blocks in HtmlHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Mar 12, 2009
1 parent cf05827 commit 8025743
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions cake/libs/view/helpers/html.php
Expand Up @@ -31,16 +31,11 @@
* @subpackage cake.cake.libs.view.helpers
*/
class HtmlHelper extends AppHelper {
/*************************************************************************
* Public variables
*************************************************************************/
/**#@+
* @access public
*/
/**
* html tags used by this helper.
*
* @var array
* @access public
*/
var $tags = array(
'meta' => '<meta%s/>',
Expand Down Expand Up @@ -100,39 +95,37 @@ class HtmlHelper extends AppHelper {
* Base URL
*
* @var string
* @access public
*/
var $base = null;
/**
* URL to current action.
*
* @var string
* @access public
*/
var $here = null;
/**
* Parameter array.
*
* @var array
* @access public
*/
var $params = array();
/**
* Current action.
*
* @var string
* @access public
*/
var $action = null;
/**
* Enter description here...
*
* @var array
* @access public
*/
var $data = null;
/**#@-*/
/*************************************************************************
* Private variables
*************************************************************************/
/**#@+
* @access private
*/
/**
* Breadcrumbs.
*
Expand Down Expand Up @@ -161,6 +154,7 @@ class HtmlHelper extends AppHelper {
* @param string $name Text for link
* @param string $link URL for link (if empty it won't be a link)
* @param mixed $options Link attributes e.g. array('id'=>'selected')
* @access public
*/
function addCrumb($name, $link = null, $options = null) {
$this->_crumbs[] = array($name, $link, $options);
Expand All @@ -178,7 +172,8 @@ function addCrumb($name, $link = null, $options = null) {
* + xhtml11: XHTML1.1.
*
* @param string $type Doctype to use.
* @return string Doctype.
* @return string Doctype string
* @access public
*/
function docType($type = 'xhtml-strict') {
if (isset($this->__docTypes[$type])) {
Expand All @@ -194,6 +189,7 @@ function docType($type = 'xhtml-strict') {
* @param array $attributes Other attributes for the generated tag. If the type attribute is html, rss, atom, or icon, the mime-type is returned.
* @param boolean $inline If set to false, the generated tag appears in the head tag of the layout.
* @return string
* @access public
*/
function meta($type, $url = null, $attributes = array(), $inline = true) {
if (!is_array($type)) {
Expand Down Expand Up @@ -253,6 +249,7 @@ function meta($type, $url = null, $attributes = array(), $inline = true) {
*
* @param string $charset The character set to be used in the meta tag. Example: "utf-8".
* @return string A meta tag containing the specified character set.
* @access public
*/
function charset($charset = null) {
if (empty($charset)) {
Expand All @@ -275,6 +272,7 @@ function charset($charset = null) {
* @param string $confirmMessage JavaScript confirmation message.
* @param boolean $escapeTitle Whether or not $title should be HTML escaped.
* @return string An <a /> element.
* @access public
*/
function link($title, $url = null, $htmlAttributes = array(), $confirmMessage = false, $escapeTitle = true) {
if ($url !== null) {
Expand Down Expand Up @@ -322,6 +320,7 @@ function link($title, $url = null, $htmlAttributes = array(), $confirmMessage =
* @param array $htmlAttributes Array of HTML attributes.
* @param boolean $inline If set to false, the generated tag appears in the head tag of the layout.
* @return string CSS <link /> or <style /> tag, depending on the type of link.
* @access public
*/
function css($path, $rel = null, $htmlAttributes = array(), $inline = true) {
if (is_array($path)) {
Expand Down Expand Up @@ -382,6 +381,7 @@ function css($path, $rel = null, $htmlAttributes = array(), $inline = true) {
*
* @param array $data
* @return string CSS styling data
* @access public
*/
function style($data, $inline = true) {
if (!is_array($data)) {
Expand All @@ -402,6 +402,7 @@ function style($data, $inline = true) {
* @param string $separator Text to separate crumbs.
* @param string $startText This will be the first crumb, if false it defaults to first crumb in array
* @return string
* @access public
*/
function getCrumbs($separator = '&raquo;', $startText = false) {
if (count($this->_crumbs)) {
Expand All @@ -427,7 +428,8 @@ function getCrumbs($separator = '&raquo;', $startText = false) {
*
* @param string $path Path to the image file, relative to the app/webroot/img/ directory.
* @param array $htmlAttributes Array of HTML attributes.
* @return string
* @return string completed img tag
* @access public
*/
function image($path, $options = array()) {
if (is_array($path)) {
Expand Down Expand Up @@ -462,10 +464,11 @@ function image($path, $options = array()) {
/**
* Returns a row of formatted and named TABLE headers.
*
* @param array $names Array of tablenames.
* @param array $trOptions HTML options for TR elements.
* @param array $thOptions HTML options for TH elements.
* @return string
* @param array $names Array of tablenames.
* @param array $trOptions HTML options for TR elements.
* @param array $thOptions HTML options for TH elements.
* @return string Completed table headers
* @access public
*/
function tableHeaders($names, $trOptions = null, $thOptions = null) {
$out = array();
Expand All @@ -484,6 +487,7 @@ function tableHeaders($names, $trOptions = null, $thOptions = null) {
* @param bool $useCount adds class "column-$i"
* @param bool $continueOddEven If false, will use a non-static $count variable, so that the odd/even count is reset to zero just for that call
* @return string Formatted HTML
* @access public
*/
function tableCells($data, $oddTrOptions = null, $evenTrOptions = null, $useCount = false, $continueOddEven = true) {
if (empty($data[0]) || !is_array($data[0])) {
Expand Down Expand Up @@ -535,6 +539,7 @@ function tableCells($data, $oddTrOptions = null, $evenTrOptions = null, $useCoun
* @param array $attributes Additional HTML attributes of the DIV tag
* @param boolean $escape If true, $text will be HTML-escaped
* @return string The formatted tag element
* @access public
*/
function tag($name, $text = null, $attributes = array(), $escape = false) {
if ($escape) {
Expand All @@ -559,6 +564,7 @@ function tag($name, $text = null, $attributes = array(), $escape = false) {
* @param array $attributes Additional HTML attributes of the DIV tag
* @param boolean $escape If true, $text will be HTML-escaped
* @return string The formatted DIV element
* @access public
*/
function div($class = null, $text = null, $attributes = array(), $escape = false) {
if ($class != null && !empty($class)) {
Expand All @@ -574,6 +580,7 @@ function div($class = null, $text = null, $attributes = array(), $escape = false
* @param array $attributes Additional HTML attributes of the P tag
* @param boolean $escape If true, $text will be HTML-escaped
* @return string The formatted P element
* @access public
*/
function para($class, $text, $attributes = array(), $escape = false) {
if ($escape) {
Expand Down

0 comments on commit 8025743

Please sign in to comment.