예제 #1
0
 public function Header()
 {
     $this->SetFont('arial', 'B', 12);
     $this->SetY(10);
     $this->MultiCell(0, 5, $this->applicationName, 0, 'C', false);
     $this->Ln(1);
     $this->SetFont('arial', 'B', 10);
     $this->MultiCell(0, 5, $this->documentTitle, 0, 'C', false);
     $this->Ln(5);
     $this->Cell(45, 7, $this->translator->trans('field.lastname', [], 'stat'), 1, 0, 'L', false);
     $this->Cell(45, 7, $this->translator->trans('field.firstname', [], 'stat'), 1, 0, 'L', false);
     $this->Cell(45, 7, $this->translator->trans('field.function', [], 'stat'), 1, 0, 'L', false);
     $this->Cell(40, 7, $this->translator->trans('field.signature', [], 'stat'), 1, 1, 'L', false);
 }
예제 #2
0
 /**
  * @see TranslatorInterface::transChoice()
  */
 public function transChoice($id, $number, array $parameters = array(), $domain = 'messages', $locale = null)
 {
     if (!isset($locale)) {
         $locale = $this->translator->getLocale();
     }
     $trans = parent::transChoice($id, $number, $parameters, $domain, $locale);
     return $this->wrap($id, $trans, $domain, $locale);
 }
예제 #3
0
    /**
     * @param PhpEngine $view
     * @param $label
     * @param $required
     * @param $compound
     * @param $id
     * @param $name
     * @param $translation_domain
     * @param $label_attr
     * @param FormHelper $formHelper
     * @param TranslatorHelper $translatorHelper
     * @param null $label_format
     */
    public function condition_label($view, $label, $required, $compound, $id, $name, $translation_domain, $label_attr, $formHelper, $translatorHelper, $label_format = null)
    {
        /** @var FormView $form */
        ?>
        <?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 = !is_null($label_format) ? strtr($label_format, array('%name%' => $name, '%id%' => $id)) : $formHelper->humanize($name);
            }
            ?>
            <label <?php 
            foreach ($label_attr as $k => $v) {
                printf('%s="%s" ', $view->escape($k), $view->escape($v));
            }
            ?>
><?php 
            echo $view->escape($translatorHelper->trans($label, array(), $translation_domain));
            ?>
: </label>
        <?php 
        }
        ?>
        <?php 
    }