本文整理汇总了PHP中Element::setClass方法的典型用法代码示例。如果您正苦于以下问题:PHP Element::setClass方法的具体用法?PHP Element::setClass怎么用?PHP Element::setClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Element
的用法示例。
在下文中一共展示了Element::setClass方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetClass
/**
* @covers Xoops\Form\Element::getClass
*/
public function testGetClass()
{
$name = 'name';
$this->object->setClass($name);
$value = $this->object->getClass();
$this->assertSame($name, $value);
}
示例2: Element
$formInscription->setAction("/Portail/Inscription");
$pseudo = new Element("pseudo", "Votre pseudo");
$pseudo->requireElement(true);
$mail = new Element("mail", "Votre email");
$mail->setTypeElement("email");
$mail->requireElement(true);
$password = new Element("password", "Mot de passe");
$password->setTypeElement("password");
$password->requireElement(true);
$confirmPassword = new Element("confirmPassword", "Confirmez votre mot de passe");
$confirmPassword->setTypeElement("password");
$confirmPassword->requireElement(true);
$birth = new Element("birth", "Votre date de naissances");
$birth->requireElement(true);
$radioHomme = new Element("sexe", "Homme");
$radioHomme->setTypeElement("radio");
$radioHomme->setName("sexeHomme");
$radioHomme->setClass("sexeRadio");
$radioFemme = new Element("sexe", "Femme");
$radioFemme->setTypeElement("radio");
$radioFemme->setName("sexeFemme");
$radioFemme->setClass("sexeRadio");
$formInscription->addElement($pseudo);
$formInscription->addElement($mail);
$formInscription->addElement($password);
$formInscription->addElement($confirmPassword);
$formInscription->addElement($birth);
$formInscription->addElement($radioFemme);
$formInscription->addElement($radioHomme);
$formInscription->submit("Inscription");
echo $formInscription->render();
示例3: submit
public function submit($textSubmit)
{
$submit = new Element("send", "Envoyer");
$submit->setLabel("");
$submit->setValue($textSubmit);
$submit->setTypeElement("submit");
$submit->setClass("btn btn-primary");
$this->addElement($submit);
}
示例4: Form
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$formConnexion = new Form("Connexion");
$formConnexion->setMethod("POST");
$formConnexion->setAction("/controller/authentification/connexion.php");
$pseudo = new Element("login", "Votre pseudo");
$pseudo->setClass("form-control");
$password = new Element("password", "Mot de passe");
$password->setTypeElement("password");
$password->setClass("form-control");
$formConnexion->addElement($pseudo);
$formConnexion->addElement($password);
$formConnexion->submit("Entrez dans le Tchat");
echo $formConnexion->render();