<?php

namespace Helpers;

use Librerias\Database;

final class MenuAction
{
    private $db_cone;

    public function __construct()
    {
        $this->db_cone = new Database();
    }

    public function getMenuActionName($module_id, $action_id)
    {
        return $this->db_cone->consultar("SELECT * FROM app_menus_acciones WHERE accion_id='{$action_id}' AND accion_id='{$module_id}'")->all();
    }

    public function getMenuActions($module_id)
    {
        return $this->db_cone->consultar("SELECT * FROM app_menus_acciones WHERE accion_id='{$module_id}' ORDER BY accion_orden")->all();
    }
}
