<?php
/**
 * @copyright ONE/DEPO Project
 * @license   PHP License 3.01 <http://www.php.net/license/3_01.txt>
 */


//JSONを扱うためのパーサ
//require_once(WEBAPP_DIR."/JSON.php");

/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

/**
 * [[機能説明]]
 *
 * @package     [[package名]]
 * @author      Your Name <mail@example.com>
 * @access      public
 */
class Customer_Itemattribute_Taglist
{
    var $session;
    var $c_tag;
    var $c_watchlist;
    var $c_itembasic;
    var $auth;

    var $itemList;
	
    /**
     * [[機能説明]]
     *
     * @access  public
     */
    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Customer_Itemattribute_Taglistが実行されました", "Customer_Itemattribute_Taglist#execute");

        return 'success';
    }
    
    function getList()
    {
	      $tagdata = $this -> c_tag -> getMyAllTag($this -> auth -> getAuthData("membercd"));
	
	      //表示用データの組み立て
	      foreach ($tagdata as $row){
	      	$list[$row['itemcd']][] = $row['tagnm'];
	      	$this -> itemList[$row['itemcd']] = $row['itemnm'];
	      }

          return $list;
    }

    function getItemName($itemcd)
    {
        if (is_array($itemcd)) $itemcd = $itemcd['itemcd'];
        return $this -> itemList[$itemcd];
    } 
    

    function getMode()
    {
	    //タグ一覧の表示
	    $array = array('title' => '',
	                    'alink' => '',
	                    'mode'  => '');
        $array['title'] = "タグ一覧";
        $array['alink'] = "ウォッチリスト一覧へ";
        return $array;
    }
}
?>
