Example #1
0
File: Form.php Project: vincium/lot
 public function buildUser()
 {
     $options = [];
     $options['clearSelect'] = true;
     $options['select'][] = \Rebond\Core\User\Data::getList(['id', 'username']);
     $models = \Rebond\Core\User\Data::loadAll($options);
     return Util\Form::buildDropdownList('userId' . $this->unique, $models, 'id', 'username', $this->getModel()->getUserId(), true);
 }
Example #2
0
 public function buildModule()
 {
     $options = [];
     $options['clearSelect'] = true;
     $options['select'][] = \Rebond\Cms\Module\Data::getList(['id', 'title']);
     $options['where'][] = 'module.status = 1';
     $items = \Rebond\Cms\Module\Data::loadAll($options);
     return Util\Form::buildDropdownList('moduleId' . $this->unique, $items, 'id', 'title', $this->getModel()->getModuleId());
 }
Example #3
0
 public function buildId()
 {
     $options = [];
     $options['clearSelect'] = true;
     $options['select'][] = \Rebond\Core\User\Data::getList(['id', 'username']);
     $options['where'][] = 'status = 1';
     $models = \Rebond\Core\User\Data::loadAll($options);
     return Util\Form::buildDropdownList('id' . $this->unique, $models, 'id', 'username', $this->getModel()->getId(), $this->idValidator['primaryKey']);
 }
Example #4
0
 public function buildFilter()
 {
     $options = [];
     $options['clearSelect'] = true;
     $options['select'][] = \Rebond\Cms\Filter\Data::getList(['id', 'title']);
     $options['where'][] = ['filter.module_id = ?', $this->getModel()->getModuleId()];
     $options['order'][] = 'filter.display_order, filter.title';
     $items = \Rebond\Cms\Filter\Data::loadAll($options);
     return Util\Form::buildDropdownList('filterId' . $this->unique, $items, 'id', 'title', $this->getModel()->getFilterId());
 }
Example #5
0
File: Form.php Project: vincium/lot
 public function buildPlayerMatch2()
 {
     $options = [];
     $options['clearSelect'] = true;
     $options['select'][] = \Own\Bus\PlayerMatch\Data::getList(['id', 'player_id']);
     $options['select'][] = \Own\Bus\Player\Data::getList(['id', 'username'], 'player_match_player');
     $options['join'][] = 'bus_player player_match_player ON player_match_player.id = player_match.player_id';
     $items = \Own\Bus\PlayerMatch\Data::loadAll($options);
     return Util\Form::buildDropdownList('player_match2_id' . $this->unique, $items, 'id', 'player', $this->getModel()->getPlayerMatch2Id());
 }
Example #6
0
 public function buildModule()
 {
     $options = [];
     $options['clearSelect'] = true;
     $options['select'][] = \Rebond\Cms\Module\Data::getList(['id', 'title']);
     $models = \Rebond\Cms\Module\Data::loadAll($options);
     return Util\Form::buildDropdownList('moduleId' . $this->unique, $models, 'id', 'title', $this->getModel()->getModuleId(), $this->moduleValidator['foreignKey']);
 }
Example #7
0
 public function buildFullComponent()
 {
     $items = \Rebond\Cms\Component\Data::loadFullComponents();
     return Util\Form::buildDropdownList('componentId' . $this->unique, $items, 'id', 'title', $this->getModel()->getComponentId(), true);
 }