This method creates a
public postLink ( string $title, string | array | null $url = null, array $options = [] ) : string | ||
$title | string | The content to be wrapped by tags. |
$url | string | array | null | Cake-relative URL or array of URL parameters, or external URL (starts with http://) |
$options | array | Array of HTML attributes. |
return | string | An `` element. |
/** * Creates a link with a surrounding form that submits via POST. * * This method creates a link in a form element. So don't use this method * in an already opened form. * * To create a normal link, you should use the `link()` method of the * `HtmlHelper`. * @param string $title The content to be wrapped by <a> tags * @param string|array|null $url Cake-relative URL or array of URL * parameters or external URL * @param array $options Array of options and HTML attributes * @return string */ public function postLink($title, $url = null, array $options = []) { $options = $this->optionsDefaults(['escape' => false, 'title' => $title], $options); $options['title'] = trim(h(strip_tags($options['title']))); list($title, $options) = $this->addIconToText($title, $options); $options = $this->addTooltip($options); return parent::postLink($title, $url, $options); }