<?php
class SmileWidget extends Widget
{
    public function run()
    {
        $list = array();
        $smiles = smiles();
        $smilesType = smileTypes();
        foreach ($smiles as $smile)
        {
            $smile['smile'] = getImageFile('bbs/smile/'.$smile['smile']);
            $list[$smilesType[$smile['type']]['name']][] = $smile;
        }
        
        $this->render('Smile', array(
                'list' => $list,
            )
        );
    }
}