PHP Classes

File: vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_label.html.php

Recommend this page to a friend!
  Classes of Murat Cileli   Papernic   vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_label.html.php   Download  
File: vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_label.html.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Papernic
Manage documents colaboratively
Author: By
Last change:
Date: 7 years ago
Size: 647 bytes
 

Contents

Class file image Download
<?php if (false !== $label): ?>
<?php
if ($required) { $label_attr['class'] = trim((isset($label_attr['class']) ? $label_attr['class'] : '').' required'); } ?>
<?php
if (!$compound) { $label_attr['for'] = $id; } ?>
<?php
if (!$label) { $label = isset($label_format)
    ?
strtr($label_format, array('%name%' => $name, '%id%' => $id))
    :
$view['form']->humanize($name); } ?>
<label <?php foreach ($label_attr as $k => $v) { printf('%s="%s" ', $view->escape($k), $view->escape($v)); } ?>><?php echo $view->escape(false !== $translation_domain ? $view['translator']->trans($label, array(), $translation_domain) : $label) ?></label>
<?php endif ?>