<?php

class Zend_View_Helper_GetTags extends Zend_View_Helper_Abstract {
  

  /**
   *
   * @param integer $language_id
   * @return Array
   */
  public function getTags($tagsArr = array()){
    // index all languages
    $model = new Model_Tags();
      $tags = $model->fetchAll();
      $txt = '';
      foreach ($tags as $key => $value) {
        $selected = "";

        if ( in_array($value->id, $tagsArr)) {
          
          $selected = " selected='selected' ";
        }
        $txt .="<option value='".$value->id."' ".$selected.">".$value->nome."</option>";
      }
    
    
    return $txt;
  }

}