Collective\Html\HtmlBuilder::entities PHP Method

entities() public method

Convert an HTML string to entities.
public entities ( string $value ) : string
$value string
return string
    public function entities($value)
    {
        return htmlentities($value, ENT_QUOTES, 'UTF-8', false);
    }

Usage Example

Example #1
0
 /**
  * Create a form label element.
  *
  * @param string $name
  * @param string $value
  * @param array  $options
  * @param bool   $escape_html
  *
  * @return \Illuminate\Support\HtmlString
  */
 public function label($name, $value = null, $options = [], $escape_html = true)
 {
     $this->labels[] = $name;
     $options = $this->html->attributes($options);
     $value = $this->formatLabel($name, $value);
     if ($escape_html) {
         $value = $this->html->entities($value);
     }
     return $this->toHtmlString('<label for="' . $name . '"' . $options . '>' . $value . '</label>');
 }
All Usage Examples Of Collective\Html\HtmlBuilder::entities