Permalink
Browse files

Merge pull request #316 from shama/2.0

Added missing @link to docs for helpers
  • Loading branch information...
2 parents 87f5b6c + 4e8239a commit a82172334732b350d466136c1ec1c2fd5d0373d8 @ADmad ADmad committed Nov 14, 2011
@@ -569,6 +569,7 @@ public function secure($fields = array()) {
*
* @param string $name The dot separated name for the field.
* @return mixed Either null, or the list of fields.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::unlockField
*/
public function unlockField($name = null) {
if ($name === null) {
@@ -181,6 +181,7 @@ public function __construct(View $View, $settings = array()) {
* @param mixed $options Link attributes e.g. array('id'=>'selected')
* @return void
* @see HtmlHelper::link() for details on $options that can be used.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#creating-breadcrumb-trails-with-htmlhelper
*/
public function addCrumb($name, $link = null, $options = null) {
$this->_crumbs[] = array($name, $link, $options);
@@ -615,6 +616,7 @@ public function style($data, $oneline = 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 Composed bread crumbs
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#creating-breadcrumb-trails-with-htmlhelper
*/
public function getCrumbs($separator = '»', $startText = false) {
if (!empty($this->_crumbs)) {
@@ -645,6 +647,7 @@ public function getCrumbs($separator = '»', $startText = false) {
*
* @param array $options Array of html attributes to apply to the generated list elements.
* @return string breadcrumbs html list
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#creating-breadcrumb-trails-with-htmlhelper
*/
public function getCrumbList($options = array()) {
if (!empty($this->_crumbs)) {
@@ -975,6 +978,7 @@ protected function _nestedListItem($items, $options, $itemOptions, $tag) {
* @param string $path Path with config file
* @return mixed False to error or loaded configs
* @throws ConfigureException
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#changing-the-tags-output-by-htmlhelper
*/
public function loadConfig($configFile, $path = null) {
if (!$path) {
@@ -159,6 +159,7 @@ public function __call($method, $params) {
* @param mixed $val A PHP variable to be converted to JSON
* @param boolean $quoteString If false, leaves string values unquoted
* @return string a JavaScript-safe/JSON representation of $val
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelper::value
**/
public function value($val = array(), $quoteString = null, $key = 'value') {
if ($quoteString === null) {
@@ -185,6 +186,7 @@ public function value($val = array(), $quoteString = null, $key = 'value') {
* @param array $options options for the code block
* @return mixed Completed javascript tag if there are scripts, if there are no buffered
* scripts null will be returned.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelper::writeBuffer
*/
public function writeBuffer($options = array()) {
$domReady = $this->request->is('ajax');
@@ -227,6 +229,7 @@ public function writeBuffer($options = array()) {
* @param boolean $top If true the script will be added to the top of the
* buffered scripts array. If false the bottom.
* @return void
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelper::buffer
*/
public function buffer($script, $top = false) {
if ($top) {
@@ -241,6 +244,7 @@ public function buffer($script, $top = false) {
*
* @param boolean $clear Whether or not to clear the script caches (default true)
* @return array Array of scripts added to the request.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelper::getBuffer
*/
public function getBuffer($clear = true) {
$this->_createVars();
@@ -281,6 +285,7 @@ protected function _createVars() {
* @param mixed $url Mixed either a string URL or an cake url array.
* @param array $options Options for both the HTML element and Js::request()
* @return string Completed link. If buffering is disabled a script tag will be returned as well.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelper::link
*/
public function link($title, $url = null, $options = array()) {
if (!isset($options['id'])) {
@@ -355,6 +360,7 @@ public function set($one, $two = null) {
* @param string $caption The display text of the submit button.
* @param array $options Array of options to use. See the options for the above mentioned methods.
* @return string Completed submit button.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelper::submit
*/
public function submit($caption = null, $options = array()) {
if (!isset($options['id'])) {
@@ -247,6 +247,7 @@ public function currency($number, $currency = 'USD', $options = array()) {
* @param array $options The array of options for this format.
* @return void
* @see NumberHelper::currency()
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/number.html#NumberHelper::addFormat
*/
public function addFormat($formatName, $options) {
$this->_currencies[$formatName] = $options + $this->_currencyDefaults;
@@ -134,6 +134,7 @@ public function params($model = null) {
* @param mixed $options Default options for pagination links. If a string is supplied - it
* is used as the DOM id element to update. See PaginatorHelper::$options for list of keys.
* @return void
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper::options
*/
public function options($options = array()) {
if (is_string($options)) {
@@ -245,6 +246,7 @@ public function sortDir($model = null, $options = array()) {
* @param string $disabledTitle Title when the link is disabled.
* @param array $disabledOptions Options for the disabled pagination link. See #options for list of keys.
* @return string A "previous" link or $disabledTitle text if the link is disabled.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper::prev
*/
public function prev($title = '<< Previous', $options = array(), $disabledTitle = null, $disabledOptions = array()) {
$defaults = array(
@@ -268,6 +270,7 @@ public function prev($title = '<< Previous', $options = array(), $disabledTitle
* @param string $disabledTitle Title when the link is disabled.
* @param mixed $disabledOptions Options for the disabled pagination link. See above for list of keys.
* @return string A "next" link or or $disabledTitle text if the link is disabled.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper::next
*/
public function next($title = 'Next >>', $options = array(), $disabledTitle = null, $disabledOptions = array()) {
$defaults = array(
@@ -293,6 +296,7 @@ public function next($title = 'Next >>', $options = array(), $disabledTitle = nu
* @param array $options Options for sorting link. See above for list of keys.
* @return string A link sorting default by 'asc'. If the resultset is sorted 'asc' by the specified
* key the returned link will sort by 'desc'.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper::sort
*/
public function sort($key, $title = null, $options = array()) {
$options = array_merge(array('url' => array(), 'model' => null), $options);
@@ -345,6 +349,7 @@ public function sort($key, $title = null, $options = array()) {
* @param mixed $url Url for the action. See Router::url()
* @param array $options Options for the link. See #options for list of keys.
* @return string A link with pagination parameters.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper::link
*/
public function link($title, $url = array(), $options = array()) {
$options = array_merge(array('model' => null, 'escape' => true), $options);
@@ -373,6 +378,7 @@ public function link($title, $url = array(), $options = array()) {
* @param boolean $asArray Return the url as an array, or a URI string
* @param string $model Which model to paginate on
* @return mixed By default, returns a full pagination URL string for use in non-standard contexts (i.e. JavaScript)
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper::url
*/
public function url($options = array(), $asArray = false, $model = null) {
$paging = $this->params($model);
@@ -547,6 +553,7 @@ public function defaultModel() {
* @param mixed $options Options for the counter string. See #options for list of keys.
* @return string Counter string.
* @deprecated The %page% style placeholders are deprecated.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper::counter
*/
public function counter($options = array()) {
if (is_string($options)) {
@@ -630,6 +637,7 @@ public function counter($options = array()) {
*
* @param mixed $options Options for the numbers, (before, after, model, modulus, separator)
* @return string numbers string.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper::numbers
*/
public function numbers($options = array()) {
if ($options === true) {
@@ -766,6 +774,7 @@ public function numbers($options = array()) {
* you want at the beginning of the range.
* @param mixed $options An array of options.
* @return string numbers string.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper::first
*/
public function first($first = '<< first', $options = array()) {
$options = array_merge(
@@ -831,6 +840,7 @@ public function first($first = '<< first', $options = array()) {
* @param mixed $last if string use as label for the link, if numeric print page numbers
* @param mixed $options Array of options
* @return string numbers string.
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper::last
*/
public function last($last = 'last >>', $options = array()) {
$options = array_merge(
@@ -38,7 +38,7 @@ class SessionHelper extends AppHelper {
*
* @param string $name the name of the session key you want to read
* @return mixed values from the session vars
- * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/session.html#displaying-notifcations-or-flash-messages
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/session.html#SessionHelper::read
*/
public function read($name = null) {
return CakeSession::read($name);
@@ -51,7 +51,7 @@ public function read($name = null) {
*
* @param string $name
* @return boolean
- * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/session.html#displaying-notifcations-or-flash-messages
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/session.html#SessionHelper::check
*/
public function check($name) {
return CakeSession::check($name);
@@ -114,7 +114,6 @@ public function error() {
* @param array $attrs Additional attributes to use for the creation of this flash message.
* Supports the 'params', and 'element' keys that are used in the helper.
* @return string
- * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/session.html#displaying-notifcations-or-flash-messages
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/session.html#SessionHelper::flash
*/
public function flash($key = 'flash', $attrs = array()) {

0 comments on commit a821723

Please sign in to comment.