<?php

use Drupal\restaurant\Helper\Helper;

class DashboardHelper extends Helper
{
  //dash = name, description, href, icon
  public function dashboard($args)
  {
    if (sizeof ($args) < 4) {
      throw new Exception("dashboard takes four arguments, " . sizeof($args) . " supplied");
    }
    $str = '<div class="dashboard">';
      $str .= '<div class="dashboard-left">';
        $str .= $this->link($args[2], $this->image($args[3], $args[0]));
      $str .= '</div>';
      $str .= '<div class="dashboard-right">';
        $str .= '<h3 class="dashboard">' . $this->link($args[2], $args[0]) . '</h3>';
        $str .= '<p>' . $args[1] . '</p>';
      $str .= '</div>';
      $str .= '<div style="clear: both;">&nbsp;</div>';
    $str .= '</div>';
    return $str;
  }
}
