コード例 #1
0
ファイル: select.php プロジェクト: johngrange/wookeyholeweb
 /**
  * bloggerBlogs.
  *
  * @param   array   $blogs     Params
  * @param   string  $name      The name for the field
  * @param   array   $attribs   Additional HTML attributes for the <select> tag
  * @param   string  $selected  The key that is selected
  * @param   string  $idTag     Params
  *
  * @return  string  HTML
  */
 public static function bloggerBlogs($blogs, $name, $attribs = array(), $selected = null, $idTag = null)
 {
     $options = array();
     $options[] = JHTML::_('select.option', null, '-' . JText::_('JSELECT') . '-');
     $items = $blogs['items'];
     foreach ($items as $blog) {
         $options[] = JHTML::_('select.option', $blog['id'], $blog['name']);
     }
     return EHtmlSelect::customGenericList($options, $name, $attribs, $selected, $idTag);
 }