本文整理汇总了PHP中Languages::fetchAlltoFlatArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Languages::fetchAlltoFlatArray方法的具体用法?PHP Languages::fetchAlltoFlatArray怎么用?PHP Languages::fetchAlltoFlatArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Languages
的用法示例。
在下文中一共展示了Languages::fetchAlltoFlatArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMainform
/**
*
*/
public function getMainform()
{
$this->setName('safinstances');
$label = new Zend_Form_Element_Text('label');
$label->setLabel('label');
$label->setRequired(true);
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel('Save');
$submit->setAttrib('id', 'submitbuttona');
$domain = new Zend_Form_Element_Text('domain');
$domain->setLabel('Main domain name');
$domain->setRequired(true);
$description = new Zend_Form_Element_Textarea('description');
$description->setLabel('Description');
$languagesId = new Zend_Form_Element_Select('languages_id');
$options = new Languages();
foreach ($options->fetchAlltoFlatArray() as $k => $v) {
$languagesId->addMultiOption($k, $v['mlabel']);
}
$languagesId->setLabel('Main language');
$creationdate = new Zend_Form_Element_Text('creationdate');
$creationdate->setLabel('Creation date');
$offlinedate = new Zend_Form_Element_Text('offlinedate');
$offlinedate->setLabel('Offline date');
$active = new Zend_Form_Element_Checkbox('active');
$active->setLabel('Is Active?');
$offlinemessage = new Zend_Form_Element_Textarea('offlinemessage');
$offlinemessage->setLabel('Offline message');
$this->addElements(array($this->idb, $this->hashb, $label, $domain, $description, $languagesId, $creationdate, $offlinedate, $active, $offlinemessage));
$this->addElements(array($submit));
return $this;
}
示例2: __construct
public function __construct($options = null)
{
parent::__construct($options);
$this->setAttrib('accept-charset', 'UTF-8');
$this->setName('safinstances');
$id = new Zend_Form_Element_Hidden('id');
$hash = new Zend_Form_Element_Hash('no_csrf_foo', array('salt' => '4s564evzaSD64sf'));
$submit = new Zend_Form_Element_Submit('submit');
$submit->setAttrib('id', 'submitbutton');
$label = new Zend_Form_Element_Text('label');
$label->setLabel('label');
$domain = new Zend_Form_Element_Text('domain');
$domain->setLabel('domain');
$description = new Zend_Form_Element_Textarea('description');
$description->setLabel('description');
$rootpath = new Zend_Form_Element_Text('rootpath');
$rootpath->setLabel('rootpath');
$languagesId = new Zend_Form_Element_Select('languages_id');
$options = new Languages();
$languagesId->addMultiOption('', '----------');
foreach ($options->fetchAlltoFlatArray() as $k => $v) {
$languagesId->addMultiOption($k, $v['mlabel']);
}
$languagesId->setLabel('languages_id');
$database = new Zend_Form_Element_Text('database');
$database->setLabel('database');
$secdomains = new Zend_Form_Element_Text('secdomains');
$secdomains->setLabel('secdomains');
$creationdate = new Zend_Form_Element_Text('creationdate');
$creationdate->setLabel('creationdate');
$offlinedate = new Zend_Form_Element_Text('offlinedate');
$offlinedate->setLabel('offlinedate');
$active = new Zend_Form_Element_Checkbox('active');
$active->setLabel('active');
$offlinemessage = new Zend_Form_Element_Text('offlinemessage');
$offlinemessage->setLabel('offlinemessage');
$metatags = new Zend_Form_Element_Text('metakeywords');
$metatags->setLabel('metakeywords');
$pagMenusSafinstances = new PagmenuslistForm('PagmenusSafinstances');
$pagMenusSafinstances->setLabel('PagmenusSafinstances');
$safinstancesSafModules = new SafmoduleslistForm('SafinstancesSafmodules');
$safinstancesSafModules->setLabel('SafinstancesSafmodules');
$safinstancesUsers = new UserslistForm('SafinstancesUsers');
$safinstancesUsers->setLabel('SafinstancesUsers');
$this->addElements(array($id, $hash, $label, $domain, $description, $rootpath, $languagesId, $database, $secdomains, $creationdate, $offlinedate, $active, $offlinemessage, $safinstancestypeId, $metatags, $pagMenusSafinstances, $safinstancesSafModules, $safinstancesUsers));
$this->addElements(array($submit));
}