mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed some API doc in views.
This commit is contained in:
parent
a0ee8b49fe
commit
02f290ac52
17 changed files with 64 additions and 47 deletions
|
@ -149,6 +149,7 @@ class Helper extends Object {
|
||||||
*
|
*
|
||||||
* @param string $method Method to invoke
|
* @param string $method Method to invoke
|
||||||
* @param array $params Array of params for the method.
|
* @param array $params Array of params for the method.
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __call($method, $params) {
|
public function __call($method, $params) {
|
||||||
trigger_error(__d('cake_dev', 'Method %1$s::%2$s does not exist', get_class($this), $method), E_USER_WARNING);
|
trigger_error(__d('cake_dev', 'Method %1$s::%2$s does not exist', get_class($this), $method), E_USER_WARNING);
|
||||||
|
@ -184,7 +185,9 @@ class Helper extends Object {
|
||||||
/**
|
/**
|
||||||
* Provides backwards compatiblity access for setting values to the request object.
|
* Provides backwards compatiblity access for setting values to the request object.
|
||||||
*
|
*
|
||||||
* @return void
|
* @param string $name Name of the property being accessed.
|
||||||
|
* @param mixed $value
|
||||||
|
* @return mixed Return the $value
|
||||||
*/
|
*/
|
||||||
public function __set($name, $value) {
|
public function __set($name, $value) {
|
||||||
switch ($name) {
|
switch ($name) {
|
||||||
|
@ -379,6 +382,7 @@ class Helper extends Object {
|
||||||
*
|
*
|
||||||
* @param string $key The name of the attribute to create
|
* @param string $key The name of the attribute to create
|
||||||
* @param string $value The value of the attribute to create.
|
* @param string $value The value of the attribute to create.
|
||||||
|
* @param boolean $escape Define if the value must be escaped
|
||||||
* @return string The composed attribute.
|
* @return string The composed attribute.
|
||||||
*/
|
*/
|
||||||
protected function _formatAttribute($key, $value, $escape = true) {
|
protected function _formatAttribute($key, $value, $escape = true) {
|
||||||
|
|
|
@ -49,6 +49,7 @@ class CacheHelper extends AppHelper {
|
||||||
/**
|
/**
|
||||||
* Parses the view file and stores content for cache file building.
|
* Parses the view file and stores content for cache file building.
|
||||||
*
|
*
|
||||||
|
* @param string $viewFile
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function afterRender($viewFile) {
|
public function afterRender($viewFile) {
|
||||||
|
@ -61,6 +62,7 @@ class CacheHelper extends AppHelper {
|
||||||
/**
|
/**
|
||||||
* Parses the layout file and stores content for cache file building.
|
* Parses the layout file and stores content for cache file building.
|
||||||
*
|
*
|
||||||
|
* @param string $layoutFile
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function afterLayout($layoutFile) {
|
public function afterLayout($layoutFile) {
|
||||||
|
@ -134,6 +136,7 @@ class CacheHelper extends AppHelper {
|
||||||
*
|
*
|
||||||
* @param string $file The filename that needs to be parsed.
|
* @param string $file The filename that needs to be parsed.
|
||||||
* @param string $cache The cached content
|
* @param string $cache The cached content
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function _parseFile($file, $cache) {
|
protected function _parseFile($file, $cache) {
|
||||||
if (is_file($file)) {
|
if (is_file($file)) {
|
||||||
|
@ -205,6 +208,7 @@ class CacheHelper extends AppHelper {
|
||||||
*
|
*
|
||||||
* @param string $content view content to write to a cache file.
|
* @param string $content view content to write to a cache file.
|
||||||
* @param sting $timestamp Duration to set for cache file.
|
* @param sting $timestamp Duration to set for cache file.
|
||||||
|
* @param boolean $useCallbacks
|
||||||
* @return boolean success of caching view.
|
* @return boolean success of caching view.
|
||||||
*/
|
*/
|
||||||
protected function _writeFile($content, $timestamp, $useCallbacks = false) {
|
protected function _writeFile($content, $timestamp, $useCallbacks = false) {
|
||||||
|
|
|
@ -139,6 +139,7 @@ class FormHelper extends AppHelper {
|
||||||
* Guess the location for a model based on its name and tries to create a new instance
|
* Guess the location for a model based on its name and tries to create a new instance
|
||||||
* or get an already created instance of the model
|
* or get an already created instance of the model
|
||||||
*
|
*
|
||||||
|
* @param string $model
|
||||||
* @return Model model instance
|
* @return Model model instance
|
||||||
*/
|
*/
|
||||||
protected function _getModel($model) {
|
protected function _getModel($model) {
|
||||||
|
@ -251,6 +252,7 @@ class FormHelper extends AppHelper {
|
||||||
/**
|
/**
|
||||||
* Returns if a field is required to be filled based on validation properties from the validating object
|
* Returns if a field is required to be filled based on validation properties from the validating object
|
||||||
*
|
*
|
||||||
|
* @param array $validateProperties
|
||||||
* @return boolean true if field is required to be filled, false otherwise
|
* @return boolean true if field is required to be filled, false otherwise
|
||||||
*/
|
*/
|
||||||
protected function _isRequiredField($validateProperties) {
|
protected function _isRequiredField($validateProperties) {
|
||||||
|
@ -1117,6 +1119,8 @@ class FormHelper extends AppHelper {
|
||||||
/**
|
/**
|
||||||
* Generate a label for an input() call.
|
* Generate a label for an input() call.
|
||||||
*
|
*
|
||||||
|
* @param string $fieldName
|
||||||
|
* @param string $label
|
||||||
* @param array $options Options for the label element.
|
* @param array $options Options for the label element.
|
||||||
* @return string Generated label element
|
* @return string Generated label element
|
||||||
*/
|
*/
|
||||||
|
@ -1992,7 +1996,6 @@ class FormHelper extends AppHelper {
|
||||||
*
|
*
|
||||||
* @param string $fieldName Prefix name for the SELECT element
|
* @param string $fieldName Prefix name for the SELECT element
|
||||||
* @param string $attributes Array of Attributes
|
* @param string $attributes Array of Attributes
|
||||||
* @param bool $showEmpty Show/Hide an empty option
|
|
||||||
* @return string Completed meridian select input
|
* @return string Completed meridian select input
|
||||||
* @access public
|
* @access public
|
||||||
* @link http://book.cakephp.org/view/1422/meridian
|
* @link http://book.cakephp.org/view/1422/meridian
|
||||||
|
@ -2216,6 +2219,7 @@ class FormHelper extends AppHelper {
|
||||||
* Gets the input field name for the current tag
|
* Gets the input field name for the current tag
|
||||||
*
|
*
|
||||||
* @param array $options
|
* @param array $options
|
||||||
|
* @param string $field
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
@ -2256,7 +2260,11 @@ class FormHelper extends AppHelper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of formatted OPTION/OPTGROUP elements
|
* Returns an array of formatted OPTION/OPTGROUP elements
|
||||||
* @access private
|
*
|
||||||
|
* @param array $elements
|
||||||
|
* @param array $parents
|
||||||
|
* @param boolean $showParents
|
||||||
|
* @param array $attributes
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function __selectOptions($elements = array(), $parents = array(), $showParents = null, $attributes = array()) {
|
function __selectOptions($elements = array(), $parents = array(), $showParents = null, $attributes = array()) {
|
||||||
|
@ -2347,7 +2355,10 @@ class FormHelper extends AppHelper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates option lists for common <select /> menus
|
* Generates option lists for common <select /> menus
|
||||||
* @access private
|
*
|
||||||
|
* @param string $name
|
||||||
|
* @param array $options
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
function __generateOptions($name, $options = array()) {
|
function __generateOptions($name, $options = array()) {
|
||||||
if (!empty($this->options[$name])) {
|
if (!empty($this->options[$name])) {
|
||||||
|
|
|
@ -1040,6 +1040,7 @@ class HtmlHelper extends AppHelper {
|
||||||
*
|
*
|
||||||
* @param string $key The name of the attribute to create
|
* @param string $key The name of the attribute to create
|
||||||
* @param string $value The value of the attribute to create.
|
* @param string $value The value of the attribute to create.
|
||||||
|
* @param boolean $escape Define if the value must be escaped
|
||||||
* @return string The composed attribute.
|
* @return string The composed attribute.
|
||||||
*/
|
*/
|
||||||
protected function _formatAttribute($key, $value, $escape = true) {
|
protected function _formatAttribute($key, $value, $escape = true) {
|
||||||
|
|
|
@ -108,18 +108,16 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
|
||||||
* when jQuery is put into noConflict() mode.
|
* when jQuery is put into noConflict() mode.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @access public
|
|
||||||
*/
|
*/
|
||||||
public $jQueryObject = '$';
|
public $jQueryObject = '$';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function to wrap repetitive simple method templating.
|
* Helper function to wrap repetitive simple method templating.
|
||||||
*
|
*
|
||||||
* @param string $method The method name being generated.
|
* @param string $method The method name being generated.
|
||||||
* @param string $template The method template
|
* @param string $template The method template
|
||||||
* @param string $selection the selection to apply
|
* @param array $options Array of options for method
|
||||||
* @param string $options Array of options for method
|
* @param array $extraSafeKeys Extra safe keys
|
||||||
* @param string $callbacks Array of callback / special options.
|
|
||||||
* @return string Composed method string
|
* @return string Composed method string
|
||||||
*/
|
*/
|
||||||
protected function _methodTemplate($method, $template, $options, $extraSafeKeys = array()) {
|
protected function _methodTemplate($method, $template, $options, $extraSafeKeys = array()) {
|
||||||
|
@ -193,7 +191,6 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
|
||||||
/**
|
/**
|
||||||
* Create an iteration over the current selection result.
|
* Create an iteration over the current selection result.
|
||||||
*
|
*
|
||||||
* @param string $method The method you want to apply to the selection
|
|
||||||
* @param string $callback The function body you wish to apply during the iteration.
|
* @param string $callback The function body you wish to apply during the iteration.
|
||||||
* @return string completed iteration
|
* @return string completed iteration
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -32,7 +32,6 @@ abstract class JsBaseEngineHelper extends AppHelper {
|
||||||
* The js snippet for the current selection.
|
* The js snippet for the current selection.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @access public
|
|
||||||
*/
|
*/
|
||||||
public $selection;
|
public $selection;
|
||||||
|
|
||||||
|
@ -42,7 +41,6 @@ abstract class JsBaseEngineHelper extends AppHelper {
|
||||||
* for end user use though.
|
* for end user use though.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @access protected
|
|
||||||
*/
|
*/
|
||||||
protected $_optionMap = array();
|
protected $_optionMap = array();
|
||||||
|
|
||||||
|
@ -51,7 +49,6 @@ abstract class JsBaseEngineHelper extends AppHelper {
|
||||||
* This allows specific 'end point' methods to be automatically buffered by the JsHelper.
|
* This allows specific 'end point' methods to be automatically buffered by the JsHelper.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @access public
|
|
||||||
*/
|
*/
|
||||||
public $bufferedMethods = array('event', 'sortable', 'drag', 'drop', 'slider');
|
public $bufferedMethods = array('event', 'sortable', 'drag', 'drop', 'slider');
|
||||||
|
|
||||||
|
@ -59,13 +56,14 @@ abstract class JsBaseEngineHelper extends AppHelper {
|
||||||
* Contains a list of callback names -> default arguments.
|
* Contains a list of callback names -> default arguments.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @access protected
|
|
||||||
*/
|
*/
|
||||||
protected $_callbackArguments = array();
|
protected $_callbackArguments = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
* @param View $View
|
||||||
|
* @param array $settings
|
||||||
*/
|
*/
|
||||||
function __construct($View, $settings = array()) {
|
function __construct($View, $settings = array()) {
|
||||||
parent::__construct($View, $settings);
|
parent::__construct($View, $settings);
|
||||||
|
@ -153,7 +151,7 @@ abstract class JsBaseEngineHelper extends AppHelper {
|
||||||
* Converts a PHP-native variable of any type to a JSON-equivalent representation
|
* Converts a PHP-native variable of any type to a JSON-equivalent representation
|
||||||
*
|
*
|
||||||
* @param mixed $val A PHP variable to be converted to JSON
|
* @param mixed $val A PHP variable to be converted to JSON
|
||||||
* @param boolean $quoteStrings If false, leaves string values unquoted
|
* @param boolean $quoteString If false, leaves string values unquoted
|
||||||
* @return string a JavaScript-safe/JSON representation of $val
|
* @return string a JavaScript-safe/JSON representation of $val
|
||||||
*/
|
*/
|
||||||
public function value($val, $quoteString = true) {
|
public function value($val, $quoteString = true) {
|
||||||
|
@ -192,7 +190,7 @@ abstract class JsBaseEngineHelper extends AppHelper {
|
||||||
* - "\n" => '\n'
|
* - "\n" => '\n'
|
||||||
* - '"' => '\"'
|
* - '"' => '\"'
|
||||||
*
|
*
|
||||||
* @param string $script String that needs to get escaped.
|
* @param string $string String that needs to get escaped.
|
||||||
* @return string Escaped string.
|
* @return string Escaped string.
|
||||||
*/
|
*/
|
||||||
public function escape($string) {
|
public function escape($string) {
|
||||||
|
@ -421,6 +419,7 @@ abstract class JsBaseEngineHelper extends AppHelper {
|
||||||
* - `hover` - Event fired when a drag enters a drop zone.
|
* - `hover` - Event fired when a drag enters a drop zone.
|
||||||
* - `leave` - Event fired when a drag is removed from a drop zone without being dropped.
|
* - `leave` - Event fired when a drag is removed from a drop zone without being dropped.
|
||||||
*
|
*
|
||||||
|
* @param array $options Array of options for the drop. See above.
|
||||||
* @return string Completed drop script
|
* @return string Completed drop script
|
||||||
*/
|
*/
|
||||||
abstract public function drop($options = array());
|
abstract public function drop($options = array());
|
||||||
|
@ -466,6 +465,7 @@ abstract class JsBaseEngineHelper extends AppHelper {
|
||||||
* - `change` - Fired when the slider's value is updated
|
* - `change` - Fired when the slider's value is updated
|
||||||
* - `complete` - Fired when the user stops sliding the handle
|
* - `complete` - Fired when the user stops sliding the handle
|
||||||
*
|
*
|
||||||
|
* @param array $options Array of options for the slider. See above.
|
||||||
* @return string Completed slider script
|
* @return string Completed slider script
|
||||||
*/
|
*/
|
||||||
abstract public function slider($options = array());
|
abstract public function slider($options = array());
|
||||||
|
|
|
@ -161,7 +161,7 @@ class JsHelper extends AppHelper {
|
||||||
* See JsBaseEngineHelper::value() for more information on this method.
|
* See JsBaseEngineHelper::value() for more information on this method.
|
||||||
*
|
*
|
||||||
* @param mixed $val A PHP variable to be converted to JSON
|
* @param mixed $val A PHP variable to be converted to JSON
|
||||||
* @param boolean $quoteStrings If false, leaves string values unquoted
|
* @param boolean $quoteString If false, leaves string values unquoted
|
||||||
* @return string a JavaScript-safe/JSON representation of $val
|
* @return string a JavaScript-safe/JSON representation of $val
|
||||||
* @access public
|
* @access public
|
||||||
**/
|
**/
|
||||||
|
@ -354,7 +354,7 @@ class JsHelper extends AppHelper {
|
||||||
* - `buffer` Whether or not you wish the script code to be buffered, defaults to true.
|
* - `buffer` Whether or not you wish the script code to be buffered, defaults to true.
|
||||||
* - Also see options for JsHelper::request() and JsHelper::event()
|
* - Also see options for JsHelper::request() and JsHelper::event()
|
||||||
*
|
*
|
||||||
* @param string $title The display text of the submit button.
|
* @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.
|
* @param array $options Array of options to use. See the options for the above mentioned methods.
|
||||||
* @return string Completed submit button.
|
* @return string Completed submit button.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -174,7 +174,6 @@ class MootoolsEngineHelper extends JsBaseEngineHelper {
|
||||||
/**
|
/**
|
||||||
* Create an iteration over the current selection result.
|
* Create an iteration over the current selection result.
|
||||||
*
|
*
|
||||||
* @param string $method The method you want to apply to the selection
|
|
||||||
* @param string $callback The function body you wish to apply during the iteration.
|
* @param string $callback The function body you wish to apply during the iteration.
|
||||||
* @return string completed iteration
|
* @return string completed iteration
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -80,9 +80,8 @@ class NumberHelper extends AppHelper {
|
||||||
/**
|
/**
|
||||||
* Returns a formatted-for-humans file size.
|
* Returns a formatted-for-humans file size.
|
||||||
*
|
*
|
||||||
* @param integer $length Size in bytes
|
* @param integer $size Size in bytes
|
||||||
* @return string Human readable size
|
* @return string Human readable size
|
||||||
* @access public
|
|
||||||
* @link http://book.cakephp.org/view/1456/toReadableSize
|
* @link http://book.cakephp.org/view/1456/toReadableSize
|
||||||
*/
|
*/
|
||||||
public function toReadableSize($size) {
|
public function toReadableSize($size) {
|
||||||
|
|
|
@ -111,6 +111,7 @@ class PaginatorHelper extends AppHelper {
|
||||||
/**
|
/**
|
||||||
* Before render callback. Overridden to merge passed args with url options.
|
* Before render callback. Overridden to merge passed args with url options.
|
||||||
*
|
*
|
||||||
|
* @param string $viewFile
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function beforeRender($viewFile) {
|
public function beforeRender($viewFile) {
|
||||||
|
@ -246,10 +247,10 @@ class PaginatorHelper extends AppHelper {
|
||||||
* - `escape` Whether you want the contents html entity encoded, defaults to true
|
* - `escape` Whether you want the contents html entity encoded, defaults to true
|
||||||
* - `model` The model to use, defaults to PaginatorHelper::defaultModel()
|
* - `model` The model to use, defaults to PaginatorHelper::defaultModel()
|
||||||
*
|
*
|
||||||
* @param string $title Title for the link. Defaults to '<< Previous'.
|
* @param string $title Title for the link. Defaults to '<< Previous'.
|
||||||
* @param mixed $options Options for pagination link. See #options for list of keys.
|
* @param array $options Options for pagination link. See #options for list of keys.
|
||||||
* @param string $disabledTitle Title when the link is disabled.
|
* @param string $disabledTitle Title when the link is disabled.
|
||||||
* @param mixed $disabledOptions Options for the disabled pagination link. See #options for list of keys.
|
* @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.
|
* @return string A "previous" link or $disabledTitle text if the link is disabled.
|
||||||
*/
|
*/
|
||||||
public function prev($title = '<< Previous', $options = array(), $disabledTitle = null, $disabledOptions = array()) {
|
public function prev($title = '<< Previous', $options = array(), $disabledTitle = null, $disabledOptions = array()) {
|
||||||
|
@ -403,6 +404,7 @@ class PaginatorHelper extends AppHelper {
|
||||||
* Converts the keys being used into the format set by options.paramType
|
* Converts the keys being used into the format set by options.paramType
|
||||||
*
|
*
|
||||||
* @param array $url Array of url params to convert
|
* @param array $url Array of url params to convert
|
||||||
|
* @param string $type
|
||||||
* @return converted url params.
|
* @return converted url params.
|
||||||
*/
|
*/
|
||||||
protected function _convertUrlKeys($url, $type) {
|
protected function _convertUrlKeys($url, $type) {
|
||||||
|
@ -424,6 +426,12 @@ class PaginatorHelper extends AppHelper {
|
||||||
/**
|
/**
|
||||||
* Protected method for generating prev/next links
|
* Protected method for generating prev/next links
|
||||||
*
|
*
|
||||||
|
* @param string $which
|
||||||
|
* @param string $title
|
||||||
|
* @param array $options
|
||||||
|
* @param string $disabledTitle
|
||||||
|
* @param array $disabledOptions
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function __pagingLink($which, $title = null, $options = array(), $disabledTitle = null, $disabledOptions = array()) {
|
protected function __pagingLink($which, $title = null, $options = array(), $disabledTitle = null, $disabledOptions = array()) {
|
||||||
$check = 'has' . $which;
|
$check = 'has' . $which;
|
||||||
|
|
|
@ -165,7 +165,6 @@ class PrototypeEngineHelper extends JsBaseEngineHelper {
|
||||||
/**
|
/**
|
||||||
* Create an iteration over the current selection result.
|
* Create an iteration over the current selection result.
|
||||||
*
|
*
|
||||||
* @param string $method The method you want to apply to the selection
|
|
||||||
* @param string $callback The function body you wish to apply during the iteration.
|
* @param string $callback The function body you wish to apply during the iteration.
|
||||||
* @return string completed iteration
|
* @return string completed iteration
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -104,6 +104,7 @@ class RssHelper extends AppHelper {
|
||||||
* Returns an RSS document wrapped in `<rss />` tags
|
* Returns an RSS document wrapped in `<rss />` tags
|
||||||
*
|
*
|
||||||
* @param array $attrib `<rss />` tag attributes
|
* @param array $attrib `<rss />` tag attributes
|
||||||
|
* @param string $content
|
||||||
* @return string An RSS document
|
* @return string An RSS document
|
||||||
*/
|
*/
|
||||||
public function document($attrib = array(), $content = null) {
|
public function document($attrib = array(), $content = null) {
|
||||||
|
@ -187,7 +188,7 @@ class RssHelper extends AppHelper {
|
||||||
/**
|
/**
|
||||||
* Converts an array into an `<item />` element and its contents
|
* Converts an array into an `<item />` element and its contents
|
||||||
*
|
*
|
||||||
* @param array $attrib The attributes of the `<item />` element
|
* @param array $att The attributes of the `<item />` element
|
||||||
* @param array $elements The list of elements contained in this `<item />`
|
* @param array $elements The list of elements contained in this `<item />`
|
||||||
* @return string An RSS `<item />` element
|
* @return string An RSS `<item />` element
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -101,9 +101,9 @@ class SessionHelper extends AppHelper {
|
||||||
* }}}
|
* }}}
|
||||||
*
|
*
|
||||||
* @param string $key The [Message.]key you are rendering in the view.
|
* @param string $key The [Message.]key you are rendering in the view.
|
||||||
* @return array $attrs Additional attributes to use for the creation of this flash message.
|
* @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.
|
* Supports the 'params', and 'element' keys that are used in the helper.
|
||||||
* @access public
|
* @return string
|
||||||
* @link http://book.cakephp.org/view/1466/Methods
|
* @link http://book.cakephp.org/view/1466/Methods
|
||||||
* @link http://book.cakephp.org/view/1467/flash
|
* @link http://book.cakephp.org/view/1467/flash
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -114,9 +114,8 @@ class TextHelper extends AppHelper {
|
||||||
* strings like http:// and ftp://.
|
* strings like http:// and ftp://.
|
||||||
*
|
*
|
||||||
* @param string $text Text to add links to
|
* @param string $text Text to add links to
|
||||||
* @param array $options Array of HTML options.
|
* @param array $htmlOptions Array of HTML options.
|
||||||
* @return string The text with links
|
* @return string The text with links
|
||||||
* @access public
|
|
||||||
* @link http://book.cakephp.org/view/1469/Text#autoLinkUrls-1619
|
* @link http://book.cakephp.org/view/1469/Text#autoLinkUrls-1619
|
||||||
*/
|
*/
|
||||||
public function autoLinkUrls($text, $htmlOptions = array()) {
|
public function autoLinkUrls($text, $htmlOptions = array()) {
|
||||||
|
@ -210,11 +209,10 @@ class TextHelper extends AppHelper {
|
||||||
* - `exact` If false, $text will not be cut mid-word
|
* - `exact` If false, $text will not be cut mid-word
|
||||||
* - `html` If true, HTML tags would be handled correctly
|
* - `html` If true, HTML tags would be handled correctly
|
||||||
*
|
*
|
||||||
* @param string $text String to truncate.
|
* @param string $text String to truncate.
|
||||||
* @param integer $length Length of returned string, including ellipsis.
|
* @param integer $length Length of returned string, including ellipsis.
|
||||||
* @param array $options An array of html attributes and options.
|
* @param array $options An array of html attributes and options.
|
||||||
* @return string Trimmed string.
|
* @return string Trimmed string.
|
||||||
* @access public
|
|
||||||
* @link http://book.cakephp.org/view/1469/Text#truncate-1625
|
* @link http://book.cakephp.org/view/1469/Text#truncate-1625
|
||||||
*/
|
*/
|
||||||
public function truncate($text, $length = 100, $options = array()) {
|
public function truncate($text, $length = 100, $options = array()) {
|
||||||
|
|
|
@ -60,7 +60,7 @@ class TimeHelper extends AppHelper {
|
||||||
*
|
*
|
||||||
* @param string $format Format with specifiers for strftime function.
|
* @param string $format Format with specifiers for strftime function.
|
||||||
* Accepts the special specifier %S which mimics th modifier S for date()
|
* Accepts the special specifier %S which mimics th modifier S for date()
|
||||||
* @param string UNIX timestamp
|
* @param string $time UNIX timestamp
|
||||||
* @return string windows safe and date() function compatible format for strftime
|
* @return string windows safe and date() function compatible format for strftime
|
||||||
*/
|
*/
|
||||||
public function convertSpecifiers($format, $time = null) {
|
public function convertSpecifiers($format, $time = null) {
|
||||||
|
@ -279,7 +279,7 @@ class TimeHelper extends AppHelper {
|
||||||
/**
|
/**
|
||||||
* Returns a partial SQL string to search for all records between two dates.
|
* Returns a partial SQL string to search for all records between two dates.
|
||||||
*
|
*
|
||||||
* @param string $dateString Datetime string or Unix timestamp
|
* @param string $begin Datetime string or Unix timestamp
|
||||||
* @param string $end Datetime string or Unix timestamp
|
* @param string $end Datetime string or Unix timestamp
|
||||||
* @param string $fieldName Name of database field to compare with
|
* @param string $fieldName Name of database field to compare with
|
||||||
* @param int $userOffset User's offset from GMT (in hours)
|
* @param int $userOffset User's offset from GMT (in hours)
|
||||||
|
@ -343,7 +343,6 @@ class TimeHelper extends AppHelper {
|
||||||
* @param string $dateString
|
* @param string $dateString
|
||||||
* @param int $userOffset User's offset from GMT (in hours)
|
* @param int $userOffset User's offset from GMT (in hours)
|
||||||
* @return boolean True if datetime string is within current month
|
* @return boolean True if datetime string is within current month
|
||||||
* @access public
|
|
||||||
* @link http://book.cakephp.org/view/1472/Testing-Time
|
* @link http://book.cakephp.org/view/1472/Testing-Time
|
||||||
*/
|
*/
|
||||||
public function isThisMonth($dateString, $userOffset = null) {
|
public function isThisMonth($dateString, $userOffset = null) {
|
||||||
|
@ -355,8 +354,8 @@ class TimeHelper extends AppHelper {
|
||||||
* Returns true if given datetime string is within current year.
|
* Returns true if given datetime string is within current year.
|
||||||
*
|
*
|
||||||
* @param string $dateString Datetime string or Unix timestamp
|
* @param string $dateString Datetime string or Unix timestamp
|
||||||
|
* @param integer $userOffset User's offset from GMT (in hours)
|
||||||
* @return boolean True if datetime string is within current year
|
* @return boolean True if datetime string is within current year
|
||||||
* @access public
|
|
||||||
* @link http://book.cakephp.org/view/1472/Testing-Time
|
* @link http://book.cakephp.org/view/1472/Testing-Time
|
||||||
*/
|
*/
|
||||||
public function isThisYear($dateString, $userOffset = null) {
|
public function isThisYear($dateString, $userOffset = null) {
|
||||||
|
@ -370,7 +369,6 @@ class TimeHelper extends AppHelper {
|
||||||
* @param string $dateString Datetime string or Unix timestamp
|
* @param string $dateString Datetime string or Unix timestamp
|
||||||
* @param int $userOffset User's offset from GMT (in hours)
|
* @param int $userOffset User's offset from GMT (in hours)
|
||||||
* @return boolean True if datetime string was yesterday
|
* @return boolean True if datetime string was yesterday
|
||||||
* @access public
|
|
||||||
* @link http://book.cakephp.org/view/1472/Testing-Time
|
* @link http://book.cakephp.org/view/1472/Testing-Time
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -385,7 +383,6 @@ class TimeHelper extends AppHelper {
|
||||||
* @param string $dateString Datetime string or Unix timestamp
|
* @param string $dateString Datetime string or Unix timestamp
|
||||||
* @param int $userOffset User's offset from GMT (in hours)
|
* @param int $userOffset User's offset from GMT (in hours)
|
||||||
* @return boolean True if datetime string was yesterday
|
* @return boolean True if datetime string was yesterday
|
||||||
* @access public
|
|
||||||
* @link http://book.cakephp.org/view/1472/Testing-Time
|
* @link http://book.cakephp.org/view/1472/Testing-Time
|
||||||
*/
|
*/
|
||||||
public function isTomorrow($dateString, $userOffset = null) {
|
public function isTomorrow($dateString, $userOffset = null) {
|
||||||
|
@ -399,7 +396,6 @@ class TimeHelper extends AppHelper {
|
||||||
* @param string $dateString
|
* @param string $dateString
|
||||||
* @param boolean $range if true returns a range in Y-m-d format
|
* @param boolean $range if true returns a range in Y-m-d format
|
||||||
* @return boolean True if datetime string is within current week
|
* @return boolean True if datetime string is within current week
|
||||||
* @access public
|
|
||||||
* @link http://book.cakephp.org/view/1471/Formatting
|
* @link http://book.cakephp.org/view/1471/Formatting
|
||||||
*/
|
*/
|
||||||
public function toQuarter($dateString, $range = false) {
|
public function toQuarter($dateString, $range = false) {
|
||||||
|
@ -492,10 +488,9 @@ class TimeHelper extends AppHelper {
|
||||||
* The returned string includes 'ago' or 'on' and assumes you'll properly add a word
|
* The returned string includes 'ago' or 'on' and assumes you'll properly add a word
|
||||||
* like 'Posted ' before the function output.
|
* like 'Posted ' before the function output.
|
||||||
*
|
*
|
||||||
* @param string $dateString Datetime string or Unix timestamp
|
* @param string $dateTime Datetime string or Unix timestamp
|
||||||
* @param array $options Default format if timestamp is used in $dateString
|
* @param array $options Default format if timestamp is used in $dateString
|
||||||
* @return string Relative time string.
|
* @return string Relative time string.
|
||||||
* @access public
|
|
||||||
* @link http://book.cakephp.org/view/1471/Formatting
|
* @link http://book.cakephp.org/view/1471/Formatting
|
||||||
*/
|
*/
|
||||||
public function timeAgoInWords($dateTime, $options = array()) {
|
public function timeAgoInWords($dateTime, $options = array()) {
|
||||||
|
@ -684,9 +679,8 @@ class TimeHelper extends AppHelper {
|
||||||
/**
|
/**
|
||||||
* Returns gmt, given either a UNIX timestamp or a valid strtotime() date string.
|
* Returns gmt, given either a UNIX timestamp or a valid strtotime() date string.
|
||||||
*
|
*
|
||||||
* @param string $dateString Datetime string
|
* @param string $string Datetime string
|
||||||
* @return string Formatted date string
|
* @return string Formatted date string
|
||||||
* @access public
|
|
||||||
* @link http://book.cakephp.org/view/1471/Formatting
|
* @link http://book.cakephp.org/view/1471/Formatting
|
||||||
*/
|
*/
|
||||||
public function gmt($string = null) {
|
public function gmt($string = null) {
|
||||||
|
@ -712,9 +706,9 @@ class TimeHelper extends AppHelper {
|
||||||
* In that case this function behaves as a wrapper for TimeHelper::i18nFormat()
|
* In that case this function behaves as a wrapper for TimeHelper::i18nFormat()
|
||||||
*
|
*
|
||||||
* @param string $format date format string (or a DateTime string)
|
* @param string $format date format string (or a DateTime string)
|
||||||
* @param string $dateString Datetime string (or a date format string)
|
* @param string $date Datetime string (or a date format string)
|
||||||
* @param boolean $invalid flag to ignore results of fromString == false
|
* @param boolean $invalid flag to ignore results of fromString == false
|
||||||
* @param int $userOffset User's offset from GMT (in hours)
|
* @param integer $userOffset User's offset from GMT (in hours)
|
||||||
* @return string Formatted date string
|
* @return string Formatted date string
|
||||||
*/
|
*/
|
||||||
public function format($format, $date = null, $invalid = false, $userOffset = null) {
|
public function format($format, $date = null, $invalid = false, $userOffset = null) {
|
||||||
|
@ -735,7 +729,7 @@ class TimeHelper extends AppHelper {
|
||||||
* Returns a formatted date string, given either a UNIX timestamp or a valid strtotime() date string.
|
* Returns a formatted date string, given either a UNIX timestamp or a valid strtotime() date string.
|
||||||
* It take in account the default date format for the current language if a LC_TIME file is used.
|
* It take in account the default date format for the current language if a LC_TIME file is used.
|
||||||
*
|
*
|
||||||
* @param string $dateString Datetime string
|
* @param string $date Datetime string
|
||||||
* @param string $format strftime format string.
|
* @param string $format strftime format string.
|
||||||
* @param boolean $invalid flag to ignore results of fromString == false
|
* @param boolean $invalid flag to ignore results of fromString == false
|
||||||
* @param int $userOffset User's offset from GMT (in hours)
|
* @param int $userOffset User's offset from GMT (in hours)
|
||||||
|
|
|
@ -30,6 +30,7 @@ class HelperCollection extends ObjectCollection {
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
|
* @param View $view
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(View $view) {
|
public function __construct(View $view) {
|
||||||
|
|
|
@ -377,6 +377,7 @@ class View extends Object {
|
||||||
* - `scripts_for_layout` - contains scripts added to header
|
* - `scripts_for_layout` - contains scripts added to header
|
||||||
*
|
*
|
||||||
* @param string $content_for_layout Content to render in a view, wrapped by the surrounding layout.
|
* @param string $content_for_layout Content to render in a view, wrapped by the surrounding layout.
|
||||||
|
* @param string $layout Layout name
|
||||||
* @return mixed Rendered output, or false on error
|
* @return mixed Rendered output, or false on error
|
||||||
* @throws CakeException if there is an error in the view.
|
* @throws CakeException if there is an error in the view.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue