/** * Renders the element widget returning html * * @param array attributes * @return string */ public function render($attributes = null) { /** * Merged passed attributes with previously defined ones */ return \WpPepVN\Tag\Select::selectField($this->prepareAttributes($attributes), $this->_optionsValues); }
/** * Builds a HTML SELECT tag using a WpPepVN\Mvc\Model resultset as options * *<code> * echo WpPepVN\Tag::select(array( * 'robotId', * Robots::find('type = 'mechanical''), * 'using' => array('id', 'name') * )); *</code> * * Volt syntax: *<code> * {{ select('robotId', robots, 'using': ['id', 'name']) }} *</code> * * @param array parameters * @param array data * @return string */ public static function select($parameters, $data = null) { return Select::selectField($parameters, $data); }