Ejemplo n.º 1
0
 /**
  * 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);
 }
Ejemplo n.º 2
0
 /**
  * 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);
 }