当前位置: 首页>>代码示例>>PHP>>正文


PHP Dropdown::__construct方法代码示例

本文整理汇总了PHP中Dropdown::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Dropdown::__construct方法的具体用法?PHP Dropdown::__construct怎么用?PHP Dropdown::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dropdown的用法示例。


在下文中一共展示了Dropdown::__construct方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 function __construct($name, $value, $valueTable, $valueField = 'nefub_id', array $where = array(), $orderBy = 'name', $direction = 'ASC', $limit = null)
 {
     parent::__construct($name, (int) $value);
     $rows = Database::select_rows($valueTable, $where, $orderBy, $limit, $direction);
     $this->addOption('Geen', 0);
     foreach ($rows as $row) {
         $this->addOption($row['name'], $row[$valueField]);
     }
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:9,代码来源:ModelDropdown.php

示例2:

 function __construct($name, $value, $min = 0, $max = 99)
 {
     parent::__construct($name, $value);
     $this->addOption('Geen', 0);
     for ($i = 0; $i <= $max; $i++) {
         $this->addOption($i, $i);
     }
     $this->addAttributes(array('class' => 'numeric'));
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:9,代码来源:NumericDropdown.php

示例3: CONCAT

 function __construct($name, $value)
 {
     parent::__construct($name, (int) $value);
     $query = "SELECT Team.nefub_id, CONCAT(Team.name, ' (', Competition.name, ')') as name\r\n\t\t\t\t\tFROM Team\r\n\t\t\t\t\tLEFT JOIN Competition ON Team.competition_nefub_id = Competition.nefub_id\r\n\t\t\t\t\tORDER BY Team.name ASC, Competition.name ASC";
     $rows = Database::select_rows_by_query($query);
     $this->addOption('Geen', 0);
     foreach ($rows as $row) {
         $this->addOption($row['name'], $row['nefub_id']);
     }
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:10,代码来源:TeamDropdown.php

示例4: substr

 function __construct($name, $value, $fieldType)
 {
     parent::__construct($name, $value);
     $enumValues = substr($fieldType, 4, strlen($fieldType) - 4);
     eval('$values = array' . $enumValues . ';');
     foreach ($values as $value) {
         $this->addOption($value, $value);
     }
     $this->addAttributes(array('class' => 'numeric'));
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:10,代码来源:EnumDropdown.php

示例5: CONCAT

 function __construct($name, $value)
 {
     parent::__construct($name, (int) $value);
     $query = "SELECT Location.nefub_id, CONCAT(Location.name, ', ', Location.city) as name\r\n\t\t\t\t\tFROM Location\r\n\t\t\t\t\tORDER BY Location.name ASC, Location.city ASC";
     $rows = Database::select_rows_by_query($query);
     $this->addOption('Geen', 0);
     foreach ($rows as $row) {
         $this->addOption($row['name'], $row['nefub_id']);
     }
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:10,代码来源:LocationDropdown.php

示例6:

 function __construct($name, $value, Game $oGame)
 {
     parent::__construct($name, $value);
     $this->addOption($oGame->getTeam1()->name . '-' . $oGame->getTeam2()->name, $value);
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:5,代码来源:GameDropdown.php


注:本文中的Dropdown::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。