Cake\View\Helper\HtmlHelper::para PHP Метод

para() публичный Метод

### Options - escape Whether or not the contents should be html_entity escaped.
public para ( string $class, string $text, array $options = [] ) : string
$class string CSS class name of the p element.
$text string String content that will appear inside the p element.
$options array Additional HTML attributes of the P tag
Результат string The formatted P element
    public function para($class, $text, array $options = [])
    {
        if (isset($options['escape'])) {
            $text = h($text);
        }
        if ($class && !empty($class)) {
            $options['class'] = $class;
        }
        $tag = 'para';
        if ($text === null) {
            $tag = 'parastart';
        }
        return $this->formatTemplate($tag, ['attrs' => $this->templater()->formatAttributes($options), 'content' => $text]);
    }

Usage Example

Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function para($class, $text, array $options = array())
 {
     if ('text' == $this->getType()) {
         return $this->_eol() . $this->_eol() . $text . $this->_eol() . $this->_eol();
     }
     return parent::para($class, $text, $this->_mergeAttributes($options, $this->config('attributes.para')));
 }
All Usage Examples Of Cake\View\Helper\HtmlHelper::para