本文整理汇总了PHP中Zend_Form_Element_Select::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Select::__construct方法的具体用法?PHP Zend_Form_Element_Select::__construct怎么用?PHP Zend_Form_Element_Select::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element_Select
的用法示例。
在下文中一共展示了Zend_Form_Element_Select::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($spec, $options = array())
{
$options = array_merge($options, array('disableLoadDefaultDecorators' => true));
parent::__construct($spec, $options);
$this->_decorator = new Monkeys_Form_Decorator_Composite();
$this->addDecorator($this->_decorator);
}
示例2: __construct
public function __construct($spec, $options = NULL)
{
if ($spec instanceof BuggyPress_Issue) {
$this->_issue = $spec;
$spec = self::FIELD_NAME;
}
parent::__construct($spec, $options);
}
示例3: __construct
public function __construct($spec = null, $options = null)
{
parent::__construct($spec, $options);
if ($options == 'everyFifteen') {
self::_buildTimeforEveryFifteen();
}
return $this;
}
示例4: __construct
public function __construct($spec, $aOptions = array())
{
if (isset($aOptions['ajax'])) {
$this->_ajax = $aOptions['ajax'];
unset($aOptions['ajax']);
$this->setRegisterInArrayValidator(false);
}
parent::__construct($spec, $aOptions);
}
示例5: __construct
public function __construct($spec = null, $options = null, $values, $required = false)
{
parent::__construct($spec, $options);
$this->addFilter('StringTrim')->setRequired($required)->setLabel($options['label'])->setAttrib('class', $options['class'])->setRegisterInArrayValidator(false)->setDescription(isset($options['desc']) ? $options['desc'] : null)->addMultiOptions($values);
if (!isset($options['style']) || $options['style'] != 'none') {
$this->setDecorators(array(new vkNgine_Form_Element_Decorator_Text()));
}
if (isset($options['removeDecorators'])) {
$this->removeDecorator('HtmlTag')->removeDecorator('Label');
}
}
示例6: __construct
public function __construct($spec, $options = null)
{
$this->addMultiOption("", "");
$groups = new Snep_GruposRamais();
$extengroups = array();
foreach ($groups->getAll() as $group) {
$extengroups[$group['id_extensiongroup']] = $group['ds_name'];
}
$this->addMultiOptions($extengroups);
parent::__construct($spec, $options);
}
示例7: __construct
/**
* Определяем опции мультиселеста и дергаем родительский конструктор
*
* @param mixed $spec
* @param array $options
*/
public function __construct($spec, $options = null)
{
if (isset($options['multiple']) && (bool) $options['multiple'] === true) {
$this->_isArray = true;
$this->multiple = 'multiple';
}
/**
* Инициализируем родительский конструктор
*/
parent::__construct($spec, $options);
}
示例8: __construct
public function __construct($spec, $options = null)
{
$this->addMultiOption("", "");
$pickupgroup = new Snep_PickupGroups_Manager();
$pickupgroups = array();
foreach ($pickupgroup->fetchAll() as $key => $val) {
$pickupgroups[$val->id_pickupgroup] = $val->ds_name;
}
$this->addMultiOptions($pickupgroups);
parent::__construct($spec, $options);
}
示例9: __construct
public function __construct($spec, $options = null)
{
foreach (PBX_Trunks::getAll() as $trunk) {
$data[$trunk->getId()] = $trunk->getName();
}
if ($data != null) {
$this->addMultiOptions($data);
} else {
$this->addMultiOption(null, '');
}
parent::__construct($spec, $options);
}
示例10: __construct
public function __construct($spec = '', $options = '')
{
parent::__construct($spec, $options);
$table = new KeyTable();
$select = $table->select();
$select->order(KeyTable::COL_FILENAME);
$rowset = $table->fetchAll($select);
$array = $rowset->toArray();
$optArray = array(null => 'Please select');
foreach ($array as $value) {
$optArray = $optArray + array($value[KeyTable::COL_ID] => $value[KeyTable::COL_FILENAME] . ' (' . $value[KeyTable::COL_NAME] . ')');
}
$this->setMultiOptions($optArray);
}
示例11: __construct
public function __construct($attributId, $spec = '', $options = '')
{
parent::__construct($spec, $options);
$table = new ValueList();
$select = $table->select();
$select->order(ValueList::COL_NAME);
$select->where(ValueList::COL_ATTRIBUTE_DESCRIPTOR_ID . "= ?", $attributId);
$rowset = $table->fetchAll($select);
$array = $rowset->toArray();
$optArray = array(null => 'Please select');
foreach ($array as $value) {
$optArray = $optArray + array($value[ValueList::COL_ID] => $value[ValueList::COL_NAME]);
}
$this->setMultiOptions($optArray);
}
示例12: ReflectionClass
function __construct($spec, $options = null)
{
parent::__construct($spec, $options);
if (!isset($options['enum'])) {
throw new Zend_Form_Exception('Please specify the enum type');
}
if (!class_exists($options['enum'])) {
throw new Zend_Form_Exception('Enum type does not exists');
}
$enumName = $options['enum'];
$oClass = new ReflectionClass($enumName);
$constants = $oClass->getConstants();
foreach ($constants as $constName => $constValue) {
$this->addMultiOption($constValue, "{$enumName}::{$constName}");
}
}
示例13: __construct
public function __construct($spec = '', $options = '', $group = '')
{
parent::__construct($spec, $options);
$table = new AttributeDescriptor();
$select = $table->select();
$select->order(AttributeDescriptor::COL_NAME);
if ($group != '') {
$select->where(AttributeDescriptor::COL_GROUP . "= ?", $group);
}
$rowset = $table->fetchAll($select);
$array = $rowset->toArray();
$optArray = array(null => 'Please select');
foreach ($array as $value) {
$optArray = $optArray + array($value[AttributeDescriptor::COL_ID] => $value[AttributeDescriptor::COL_NAME]);
}
$this->setMultiOptions($optArray);
}
示例14: __construct
public function __construct($spec = '', $options = '')
{
parent::__construct($spec, $options);
// $table = new Expertise();
// $select = $table->select();
// $select->order(Expertise::COL_SPECIES);
// //$select->where(ValueList::COL_ATTRIBUTE_DESCRIPTOR_ID . "= ?",$attributId);
// $rowset = $table->fetchAll($select);
$dbAdapter = Zend_Registry::get('DB_CONNECTION1');
$select = $dbAdapter->select();
$select->from(Expertise::TABLE_NAME);
$select->joinLeft(array('valSpec' => ValueList::TABLE_NAME), Expertise::COL_SPECIES . ' = ' . 'valSpec.' . ValueList::COL_ID, array('valSpec' => ValueList::COL_VALUE));
$select->joinLeft(array('valSubj' => ValueList::TABLE_NAME), Expertise::COL_SUBJECT . ' = ' . 'valSubj.' . ValueList::COL_ID, array('valSubj' => ValueList::COL_VALUE));
$array = $dbAdapter->fetchAll($select);
//$array = $rowset->toArray();
$optArray = array(null => 'Please select');
foreach ($array as $value) {
$merged = $value[Expertise::COL_ID] . ',' . $value[Expertise::COL_AREA] . ',' . $value['valSpec'] . ',' . $value['valSubj'];
$optArray = $optArray + array($value[Expertise::COL_ID] => $merged);
}
$this->setMultiOptions($optArray);
}
示例15: __construct
public function __construct($spec, $options = null)
{
$options = array_merge($options, $this->_defaultOptions);
return parent::__construct($spec, $options);
}