Génère une balise legend.

@param string     $key     Clé unique.
@param array|null $attrAdd Liste d'attributs additionnels.

@return string HTML
433256
public function form_legend($key, array $attrAdd = null)
    {
        $item   = $this->getItem($key);
        $attr   = $this->merge_attr($item[ 'attr' ], $attrAdd);
        $legend = isset($attr[ 'attr' ][ 'label' ])
            ? $attr[ 'attr' ][ 'legend' ]
            : $item[ 'legend' ];
        unset($attr[ 'attr' ][ 'legend' ]);

        return '<legend'
            . $this->getAttributesCSS($attr)
            . $this->getAttributesInput($attr) . '>'
            . $legend
            . "</legend>\r\n";
    }
1016988
public function pattern($pattern, $attr = null)
    {
        if (is_array($pattern)) {
            foreach ($pattern as $key => $value) {
                if (! in_array('{' . $key . '}', array_keys($this->patterns))) {
                    $this->patterns['{' . $key . '}'] = '(' . $value . ')';
                } else {
                    return $this->exception($key . ' pattern cannot be changed.');
                }
            }
        } else {
            if (! in_array('{' . $pattern . '}', array_keys($this->patterns))) {
                $this->patterns['{' . $pattern . '}'] = '(' . $attr . ')';
            } else {
                return $this->exception($pattern . ' pattern cannot be changed.');
            }
        }

        return true;
    }
1009426
protected function _renderTag($attribs = array(), $content = null)
    {
        unset($attribs['content']);
        unset($attribs['separator']);

        $attribs = $this->buildAttributes($attribs);

        if($this->getConfig()->escape) {
            $content = $this->getTemplate()->escape($content);
        }

        $html = '<title '.$attribs.'>'.$content.'</title>'."\n";
        return $html;
    }
809596
public function textField($key, $label=null, array $attr=[]){
		$field = $this->factory("text", $key, $label, $attr);
		return $this->addField($field);
	}
244762
public function attr($key = null, $default = null)
    {
        return is_null($key) ? $this->attributes : array_get($this->attributes, $key, $default);
    }
1324553
public function getNodeAttribute($xPath,$atrName){
        $res = $this->content->xpath($xPath);
        if ($res !== null){
            foreach ($res as $set){
                return (string)$set[$atrName];

            }
        }

        return NULL;
    }
57875
public function addAttr($key, array $attr)
    {
        if ($this->addAttrRecurses($key, $attr)) {
            return $this;
        }

        throw new \Exception(htmlspecialchars("The item $key was not found."));
    }
488807
public function getM2MAttr(ForeignObjectRel $relation, $attr)
    {
        $cache_attr = sprintf('_m2m_%s_cache', $attr);
        if ($this->hasProperty($cache_attr)) {
            return $this->{$cache_attr};
        }

        $linkName = null;
        if ($this->relation->throughFields) {
            $linkName = $this->relation->throughFields[0];
        }

        $fromModel = $relation->getFromModel()->getMeta()->getNSModelName();
        /** @var $field RelatedField */
        foreach ($this->relation->through->getMeta()->getFields() as $field) {
            if ($field->isRelation && (is_null($linkName) || $linkName == $field->getName()) &&
                $field->relation->toModel->getMeta()->getNSModelName() == $fromModel) {
                $this->{$cache_attr} = ('name' == $attr) ? call_user_func([$field, 'getName']) : $field->{$attr};

                return $this->{$cache_attr};
            }
        }
    }
103989
public function form_group($key, array $attrAdd = null)
    {
        $item = $this->getItem($key);
        $attr = $this->merge_attr($item[ 'attr' ], $attrAdd);

        $balise = in_array($attr[ 'balise' ], $this->baliseGroup)
            ? $attr[ 'balise' ]
            : 'div';

        return '<' . $balise . $this->getAttributesCSS($attr) . ">\r\n"
            . $item[ 'subform' ]->renderSubForm()
            . '</' . $balise . ">\r\n";
    }
259726
public function afficher($id)
    {
        $html = '';
        $formulaire = new formGenerator();
        if ($formulaire->estChiffre($id) == 1) {
            $sql = 'SELECT p.nom as nom, p.prenom as prenom,  m.nom as metier,  p.idPersonne as idPersonne,  p.dateNaissance as dateNaissance,  p.dateDeces as dateDeces,  p.description as description
                    FROM personne p
                    LEFT JOIN metier m ON m.idMetier = p.idMetier
                    WHERE p.idPersonne='.$id.' LIMIT 1';
            $rep = $this->connexionBdd->requete($sql);
            if (mysql_num_rows($rep) == 1) {
                $res = mysql_fetch_object($rep);

                $t = new Template('modules/archi/templates/');
                $t->set_filenames((array('pe'=>'personne.tpl')));

                $e = new archiEvenement();

                $t->assign_vars(
                    array(
                        'prenom' => $res->prenom,
                        'nom'    => $res->nom,
                        'metier' => $res->metier,
                        'dateNaissance'=> $this->date->toFrench($res->dateNaissance),
                        'dateDeces'    => $this->date->toFrench($res->dateDeces),
                        'description'  => $res->description,
                        'urlAjout'     => $this->creerUrl('ajouterPersonne'),
                        'evenementLies'=> $e->afficherListe(array( 'selection' => 'personne',  'id' => $res->idPersonne))
                    )
                );

                ob_start();
                $t->pparse('pe');
                $html .= ob_get_contents();
                ob_end_clean();
            } else {
                $html .= 'ERREUR aucun résultat !';
            }
        } else {
            $html .= 'ERREUR mauvais ID!';
        }
        return $html;
    }
1197076
public function getHTML()
    {
        $e = $this;

        $o = '<div class="atk-layout">';

        $o .= $this->getHTMLHeader();

        $o .= $this->getHTMLSolution();

        //$o.=$this->getHTMLBody();

        $o .= '<div class="atk-layout-row"><div class="atk-wrapper atk-section-small">';
        if (isset($e->more_info)) {
            $o .= '<h3>Additional information:</h3>';
            $o .= $this->print_r($e->more_info, '<ul>', '</ul>', '<li>', '</li>', ' ');
        }
        if (method_exists($e, 'getMyFile')) {
            $o .= '<div class="atk-effect-info">'.$e->getMyFile().':'.$e->getMyLine().'</div>';
        }

        if (method_exists($e, 'getMyTrace')) {
            $o .= $this->backtrace(3, $e->getMyTrace());
        } else {
            $o .= $this->backtrace(@$e->shift, $e->getTrace());
        }

        if (isset($e->by_exception)) {
            $o .= '<h3>This error was triggered by the following error:</h3>';
            if ($e->by_exception instanceof self) {
                $o .= $e->by_exception->getHTML();
            } elseif ($e->by_exception instanceof Exception) {
                $o .= $e->by_exception->getMessage();
            }
        }
        $o .= '</div></div>';

        return $o;
    }
911752
private function lexique($key, $attributes)
    {
        if (is_string($attributes)) {
            $attributes = ['attribute' => $attributes];
        }

        // Get lexique provider by application part
        $lexique = trans('lexique.'.$key, $attributes);

        if (is_null($lexique)) {
            $lexique = $this->lexique[$key];

            foreach ($attributes as $key => $value) {
                $lexique = str_replace(':'.$key, $value, $lexique);
            }
        }

        return $lexique;
    }
225970
public function document($attrib = [], $content = null)
    {
        if ($content === null) {
            $content = $attrib;
            $attrib = [];
        }
        if (!isset($attrib['version']) || empty($attrib['version'])) {
            $attrib['version'] = $this->version;
        }

        return $this->elem('rss', $attrib, $content);
    }
143224
protected function getTranslated($attribut, $language = null) {
        $language = $language ? $language : Locale::getPrimaryLanguage(Locale::getDefault());
        return $this->getTranslationByLang($language) ? $this->getTranslationByLang($language)->{"get" . $attribut}() : false;
    }
1108436
public function getAsHtml($key = null) {
		if ($key === null) {
			$data = $this->data;
		} else {
			if (is_object($this->data) && isset($this->data->{$key})) {
				$data = $this->data->{$key};
			} elseif (is_array($this->data) && isset($this->data[$key])) {
				$data = $this->data[$key];
			} else {
				$data = null;
			}
		}

		$html =<<<HTML
			<div class="debugger">
				<div class="debug">
					{$this->getHtml($data, $this->title)}
				</div>
			</div>
HTML;
		return $html;
	}
1254629
protected function message_container($attrib)
    {
        if (isset($attrib['id']) === false) {
            $attrib['id'] = 'rcmMessageContainer';
        }

        $this->add_gui_object('message', $attrib['id']);

        return html::div($attrib, '');
    }
32154
public function getId($key = null)
    {
        return (isset($this->index[$key]) && !is_null($key)) ?
            $this->index[$key] :
            $this->index[$this->getKeyName()];
    }