本文整理汇总了PHP中select::setLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP select::setLabel方法的具体用法?PHP select::setLabel怎么用?PHP select::setLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类select
的用法示例。
在下文中一共展示了select::setLabel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
/**
* Initialize the products form
*/
public function initialize($entity = null, $options = array())
{
$f = new text("url_base");
$f->setLabel('URL BASE');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new select("ativo", array('1' => 'Sim', '0' => 'Não'));
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new select("manutencao", array('1' => 'Sim', '0' => 'Não'));
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new select("orcamento", array('1' => 'Sim', '0' => 'Não'));
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new select("adicionar_carrinho", array('1' => 'Sim', '0' => 'Não'));
$f->setLabel('Adicionar Carrinho');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new text("plano");
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new numeric("limite_produtos");
$f->setLabel('Limite de Produtos');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new select("certificado", array('certising' => 'Certising', 'comodo' => 'Comodo', 'norton' => 'Norton', 'rapidssl' => 'Rapid SSL', 'site_blindado' => 'Site Blindado'));
$f->setAttribute('class', 'form-control');
$this->add($f);
}
示例2: initialize
public function initialize($entity = null, $option = array())
{
if (!isset($option['edit'])) {
$element = new Text("id");
$this->add($element->setLabel("id"));
} else {
$this->add(new Hidden("id"));
}
$name = new Text("name");
$name->addValidator(new PresenceOf(array('message' => 'The name is required')));
$name->setLabel("分类名称");
$this->add($name);
$isParent = new select('isParent', array("0" => "否", '1' => '是'), array("value" => 1));
$isParent->setLabel("是");
$this->add($isParent);
$parentId = new select("parentId", Category::find("isParent=1 and status=1"), array("using" => array("id", "name"), 'useEmpty' => true, 'emptyText' => '...', 'emptyValue' => '0', "value" => 0));
$parentId->setlabel("父类名称:");
$this->add($parentId);
}
示例3: initialize
/**
* Initialize the products form
*/
public function initialize($entity = null, $options = array())
{
$f = new select("template_nome", array('7store' => '7store', 'Bewear' => 'Bewear', 'Bohase' => 'Bohase', 'Classic' => 'Classic', 'Everything' => 'Everything', 'Hosoren' => 'Hosoren', 'Micra' => 'Micra', 'ShopMe' => 'ShopMe', 'Smile' => 'Smile', 'Unicase' => 'Unicase'));
$f->setLabel('Template Nome');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new text("template_variacao");
$f->setLabel('Template Variação');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new text("imagem_size");
$f->setLabel('Imagem Size');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new text("thumbnail_size");
$f->setLabel('Thumbnail Size');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new text("paginacao_tipo");
$f->setLabel('Paginaçao Tipo');
$f->setAttribute('class', 'form-control');
$this->add($f);
}